Package com.jcraft.jzlib
Class DeflaterOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- com.jcraft.jzlib.DeflaterOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Direct Known Subclasses:
GZIPOutputStream
public class DeflaterOutputStream extends FilterOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]bufferprotected static intDEFAULT_BUFSIZEprotected Deflaterdeflaterprotected booleanmydeflater-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description DeflaterOutputStream(OutputStream out)DeflaterOutputStream(OutputStream out, Deflater def)DeflaterOutputStream(OutputStream out, Deflater deflater, int size)DeflaterOutputStream(OutputStream out, Deflater deflater, int size, boolean close_out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected intdeflate(int flush)voidfinish()voidflush()DeflatergetDeflater()booleangetSyncFlush()longgetTotalIn()longgetTotalOut()voidsetSyncFlush(boolean syncFlush)voidwrite(byte[] b, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.FilterOutputStream
write
-
-
-
-
Field Detail
-
deflater
protected final Deflater deflater
-
buffer
protected byte[] buffer
-
mydeflater
protected boolean mydeflater
-
DEFAULT_BUFSIZE
protected static final int DEFAULT_BUFSIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DeflaterOutputStream
public DeflaterOutputStream(OutputStream out) throws IOException
- Throws:
IOException
-
DeflaterOutputStream
public DeflaterOutputStream(OutputStream out, Deflater def) throws IOException
- Throws:
IOException
-
DeflaterOutputStream
public DeflaterOutputStream(OutputStream out, Deflater deflater, int size) throws IOException
- Throws:
IOException
-
DeflaterOutputStream
public DeflaterOutputStream(OutputStream out, Deflater deflater, int size, boolean close_out) throws IOException
- Throws:
IOException
-
-
Method Detail
-
write
public void write(int b) throws IOException- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
finish
public void finish() throws IOException- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-
deflate
protected int deflate(int flush) throws IOException- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classFilterOutputStream- Throws:
IOException
-
getTotalIn
public long getTotalIn()
-
getTotalOut
public long getTotalOut()
-
setSyncFlush
public void setSyncFlush(boolean syncFlush)
-
getSyncFlush
public boolean getSyncFlush()
-
getDeflater
public Deflater getDeflater()
-
-