java.util.zip
public class GZIPInputStream extends InflaterInputStream
Since: JDK 1.1
Field Summary | |
---|---|
protected CRC32 | crc
The CRC-32 checksum value for uncompressed data. |
protected boolean | eos
Indicates whether or not the end of the stream has been reached. |
static int | GZIP_MAGIC
The magic number found at the start of a GZIP stream. |
Constructor Summary | |
---|---|
GZIPInputStream(InputStream in)
Creates a GZIPInputStream with the default buffer size.
| |
GZIPInputStream(InputStream in, int size)
Creates a GZIPInputStream with the specified buffer size.
|
Method Summary | |
---|---|
void | close()
Closes the input stream.
|
int | read(byte[] buf, int offset, int len)
Reads in GZIP-compressed data and stores it in uncompressed form
into an array of bytes. |
Parameters: in The stream to read compressed data from (in GZIP format).
Throws: IOException if an error occurs during an I/O operation.
Parameters: in The stream to read compressed data from (in GZIP format). size The size of the buffer to use.
Throws: IOException if an error occurs during an I/O operation. IllegalArgumentException if size
is less than or equal to 0.
Throws: IOException if an error occurs during an I/O operation.
Parameters: buf the buffer into which the uncompressed data will
be stored. offset the offset indicating where in buf
the uncompressed data should be placed. len the number of uncompressed bytes to be read.