Save This Page
Home » openjdk-7 » java » util » zip » [javadoc | source]
java.util.zip
public class: GZIPInputStream [javadoc | source]
java.lang.Object
   java.io.InputStream
      java.io.FilterInputStream
         java.util.zip.InflaterInputStream
            java.util.zip.GZIPInputStream

All Implemented Interfaces:
    Closeable

This class implements a stream filter for reading compressed data in the GZIP file format.
Field Summary
protected  CRC32 crc    CRC-32 for uncompressed data. 
protected  boolean eos    Indicates end of input stream. 
public static final  int GZIP_MAGIC    GZIP header magic number. 
Fields inherited from java.util.zip.InflaterInputStream:
inf,  buf,  len,  usesDefaultInflater
Fields inherited from java.io.FilterInputStream:
in
Constructor:
 public GZIPInputStream(InputStream in) throws IOException 
    Creates a new input stream with a default buffer size.
    Parameters:
    in - the input stream
    Throws:
    IOException - if an I/O error has occurred
    exception: IOException - if an I/O error has occurred
 public GZIPInputStream(InputStream in,
    int size) throws IOException 
    Creates a new input stream with the specified buffer size.
    Parameters:
    in - the input stream
    size - the input buffer size
    Throws:
    IOException - if an I/O error has occurred
    IllegalArgumentException - if size is <= 0
    exception: IOException - if an I/O error has occurred
    exception: IllegalArgumentException - if size is <= 0
Method from java.util.zip.GZIPInputStream Summary:
close,   read
Methods from java.util.zip.InflaterInputStream:
available,   close,   fill,   mark,   markSupported,   read,   read,   reset,   skip
Methods from java.io.FilterInputStream:
available,   close,   mark,   markSupported,   read,   read,   read,   reset,   skip
Methods from java.io.InputStream:
available,   close,   mark,   markSupported,   read,   read,   read,   reset,   skip
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.util.zip.GZIPInputStream Detail:
 public  void close() throws IOException 
    Closes this input stream and releases any system resources associated with the stream.
 public int read(byte[] buf,
    int off,
    int len) throws IOException 
    Reads uncompressed data into an array of bytes. If len is not zero, the method will block until some input can be decompressed; otherwise, no bytes are read and 0 is returned.