public class GzipCompressorOutputStream extends CompressorOutputStream
GZIPOutputStream class by allowing
the configuration of the compression level and the header metadata (file name,
comment, modification time, operating system and extra flags).| Constructor and Description |
|---|
GzipCompressorOutputStream(OutputStream out)
Creates a gzip compressed output stream with the default parameters.
|
GzipCompressorOutputStream(OutputStream out,
GzipParameters parameters)
Creates a gzip compressed output stream with the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
finish()
Finishes writing compressed data to the underlying stream without closing it.
|
void |
flush() |
void |
write(byte[] buffer) |
void |
write(byte[] buffer,
int offset,
int length) |
void |
write(int b) |
public GzipCompressorOutputStream(OutputStream out) throws IOException
out - the stream to compress toIOException - if writing failspublic GzipCompressorOutputStream(OutputStream out, GzipParameters parameters) throws IOException
out - the stream to compress toparameters - the parameters to useIOException - if writing failspublic void write(int b) throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] buffer) throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] buffer, int offset, int length) throws IOException
write in class OutputStreamIOExceptionpublic void finish() throws IOException
IOException - on errorpublic void flush() throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionCopyright © 2020 The Apache Software Foundation. All rights reserved.