public class GZIPOutputStream
extends java.util.zip.DeflaterOutputStream
GZIPOutputStream
Constructor and Description |
---|
GZIPOutputStream(java.io.OutputStream out) |
GZIPOutputStream(java.io.OutputStream out,
int compressionLevel,
int strategy) |
GZIPOutputStream(java.io.OutputStream out,
int compressionLevel,
int strategy,
int encodingMode) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Calls super function, which in turn closes the underlying 'in' stream
|
void |
finish() |
void |
write(byte[] buffer,
int offset,
int length) |
void |
write(int v)
Writes a byte.
|
public GZIPOutputStream(java.io.OutputStream out, int compressionLevel, int strategy, int encodingMode) throws java.io.IOException
out
- compressionLevel
- strategy
- Deflate compression strategyencodingMode
- FORCE_GZIP to write gzwrite compatible output;
FORCE_DEFLATE to write gzip header and zlib header,
but do not write crc32 trailerjava.io.IOException
public GZIPOutputStream(java.io.OutputStream out, int compressionLevel, int strategy) throws java.io.IOException
out
- compressionLevel
- strategy
- Deflate compression strategyjava.io.IOException
public GZIPOutputStream(java.io.OutputStream out) throws java.io.IOException
out
- java.io.IOException
public void write(int v) throws java.io.IOException
write
in class java.util.zip.DeflaterOutputStream
input
- java.io.IOException
public void write(byte[] buffer, int offset, int length) throws java.io.IOException
write
in class java.util.zip.DeflaterOutputStream
input
- offset
- length
- java.io.IOException
public void finish() throws java.io.IOException
finish
in class java.util.zip.DeflaterOutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.util.zip.DeflaterOutputStream
java.io.IOException