Name
GZIPInputStream
Synopsis
This class is a subclass of
InflaterInputStream
that reads and uncompresses
data compressed in gzip format. To create a
GZIPInputStream
, simply specify the
InputStream
to read compressed data from and,
optionally, a buffer size for the internal decompression buffer. Once
a GZIPInputStream
is created, you can use the
read( )
and close( )
methods as
you would with any input stream.
Figure 16-140. java.util.zip.GZIPInputStream
public class GZIPInputStream extends InflaterInputStream { // Public Constructors public GZIPInputStream(java.io.InputStream in) throws java.io.IOException; public GZIPInputStream(java.io.InputStream in, int size) throws java.io.IOException; // Public Constants public static final int GZIP_MAGIC; =35615 // Public Methods Overriding InflaterInputStream public void close( ) throws java.io.IOException; public int read(byte[ ] buf, int off, int len) throws java.io.IOException; // Protected Instance Fields protected CRC32 crc; protected boolean eos; }
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.