java.util.zip
Class GZIPInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--java.util.zip.InflaterInputStream
|
+--java.util.zip.GZIPInputStream
This filter stream is used to decompress a "GZIP" format stream.
The "GZIP" format is described in RFC 1952.
Since:Author: void | close()
|
int | read(byte[] buf, int offset, int len)
|
GZIP_MAGIC
public static final int GZIP_MAGIC
The magic number found at the start of a GZIP stream.
crc
protected CRC32 crc
The CRC-32 checksum value for uncompressed data.
eos
protected boolean eos
Indicates whether or not the end of the stream has been reached.
GZIPInputStream
public GZIPInputStream(java.io.InputStream in)
Creates a GZIPInputStream with the default buffer size.
Parameters:
Throws:
IOException
- if an error occurs during an I/O operation.
GZIPInputStream
public GZIPInputStream(java.io.InputStream in, int size)
Creates a GZIPInputStream with the specified buffer size.
Parameters:
Throws:
close
public void close()
Closes the input stream.
Throws:
IOException
- if an error occurs during an I/O operation.
read
public int read(byte[] buf, int offset, int len)
Reads in GZIP-compressed data and stores it in uncompressed form
into an array of bytes. The method will block until either
enough input data becomes available or the compressed stream
reaches its end.
Parameters: