public class GZIPOutputStream extends DeflaterOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected CRC32 |
crc
CRC-32 value for uncompressed data
|
buf, defout| Constructor and Description |
|---|
GZIPOutputStream(OutputStream out) |
GZIPOutputStream(OutputStream out,
int size)
Creates a GZIPOutputStream with the specified buffer 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, writewriteprotected CRC32 crc
public GZIPOutputStream(OutputStream out) throws IOException
IOExceptionpublic GZIPOutputStream(OutputStream out, int size) throws IOException
out - The stream to read compressed data fromsize - Size of the buffer to useIOExceptionpublic 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.IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class DeflaterOutputStreamIOExceptionpublic void finish()
throws IOException
DeflaterOutputStreamfinish in class DeflaterOutputStreamIOExceptionCopyright © 2009–2017. All rights reserved.