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
IOExceptionpublic DeflateCompressorOutputStream(OutputStream outputStream, DeflateParameters parameters) throws IOException
IOExceptionpublic 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
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.