public class GZIPOutputStream extends DeflaterOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected CRC32 |
crc |
buf, defout| Constructor and Description |
|---|
GZIPOutputStream(OutputStream out) |
GZIPOutputStream(OutputStream out,
int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Writes remaining compressed output data to the output stream
and closes it.
|
void |
finish()
Finishes the stream by calling finish() on the deflater.
|
void |
write(byte[] buf,
int off,
int len)
Writes a len bytes from an array to the compressed stream.
|
deflate, flush, writewritefinalizeprotected CRC32 crc
public GZIPOutputStream(OutputStream out) throws IOException
IOExceptionpublic GZIPOutputStream(OutputStream out, int size) throws IOException
IOExceptionpublic void write(byte[] buf,
int off,
int len)
throws IOException
DeflaterOutputStreamwrite in class DeflaterOutputStreambuf - the byte array.off - the offset into the byte array where to start.len - the number of bytes to write.IOException - If an error occurspublic void close()
throws IOException
close in class DeflaterOutputStreamIOException - If an error occurspublic void finish()
throws IOException
DeflaterOutputStreamfinish in class DeflaterOutputStreamIOException