public class DeflateCompressorOutputStream extends CompressorOutputStream
| Constructor and Description |
|---|
DeflateCompressorOutputStream(OutputStream outputStream)
Creates a Deflate compressed output stream with the default parameters.
|
DeflateCompressorOutputStream(OutputStream outputStream,
DeflateParameters parameters)
Creates a Deflate compressed output stream with the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
finish()
Finishes compression without closing the underlying stream.
|
void |
flush()
Flushes the encoder and calls
outputStream.flush(). |
void |
write(byte[] buf,
int off,
int len) |
void |
write(int b) |
writepublic DeflateCompressorOutputStream(OutputStream outputStream) throws IOException
outputStream - the stream to wrapIOException - on errorpublic DeflateCompressorOutputStream(OutputStream outputStream, DeflateParameters parameters) throws IOException
outputStream - the stream to wrapparameters - the deflate parameters to applyIOException - on errorpublic void write(int b) throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] buf, int off, int len) throws IOException
write in class OutputStreamIOExceptionpublic void flush() throws 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 Flushableflush in class OutputStreamIOExceptionpublic void finish() throws IOException
No more data can be written to this stream after finishing.
IOException - on errorpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionCopyright © 2002–2020 The Apache Software Foundation. All rights reserved.