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(java.io.OutputStream out)
Creates a gzip compressed output stream with the default parameters.
|
GzipCompressorOutputStream(java.io.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(java.io.OutputStream out)
throws java.io.IOException
out - the stream to compress tojava.io.IOException - if writing failspublic GzipCompressorOutputStream(java.io.OutputStream out,
GzipParameters parameters)
throws java.io.IOException
out - the stream to compress toparameters - the parameters to usejava.io.IOException - if writing failspublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] buffer)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void finish()
throws java.io.IOException
java.io.IOException - on errorpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionCopyright © 2010 - 2023 Adobe. All Rights Reserved