public class DeflateCompressorOutputStream extends CompressorOutputStream
| Constructor and Description |
|---|
DeflateCompressorOutputStream(java.io.OutputStream outputStream)
Creates a Deflate compressed output stream with the default parameters.
|
DeflateCompressorOutputStream(java.io.OutputStream outputStream,
DeflateParameters parameters)
Creates a Deflate compressed output stream with the specified parameters.
|
public DeflateCompressorOutputStream(java.io.OutputStream outputStream)
throws java.io.IOException
outputStream - the stream to wrapjava.io.IOException - on errorpublic DeflateCompressorOutputStream(java.io.OutputStream outputStream,
DeflateParameters parameters)
throws java.io.IOException
outputStream - the stream to wrapparameters - the deflate parameters to applyjava.io.IOException - on errorpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] buf,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
outputStream.flush().
All buffered pending data will then be decompressible from
the output stream. Calling this function very often may increase
the compressed file size a lot.flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void finish()
throws java.io.IOException
No more data can be written to this stream after finishing.
java.io.IOException - on errorpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException