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

All Implemented Interfaces:
    ZipConstants, Closeable

Direct Known Subclasses:
    JarInputStream

This class implements an input stream filter for reading files in the ZIP file format. Includes support for both compressed and uncompressed entries.
Fields inherited from java.util.zip.InflaterInputStream:
inf,  buf,  len,  usesDefaultInflater
Fields inherited from java.io.FilterInputStream:
in
Constructor:
 public ZipInputStream(InputStream in) 
    Creates a new ZIP input stream.
    Parameters:
    in - the actual input stream
Method from java.util.zip.ZipInputStream Summary:
available,   close,   closeEntry,   createZipEntry,   getNextEntry,   read,   skip
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.ZipInputStream Detail:
 public int available() throws IOException 
    Returns 0 after EOF has reached for the current entry data, otherwise always return 1.

    Programs should not count on this method to return the actual number of bytes that could be read without blocking.

 public  void close() throws IOException 
    Closes this input stream and releases any system resources associated with the stream.
 public  void closeEntry() throws IOException 
    Closes the current ZIP entry and positions the stream for reading the next entry.
 protected ZipEntry createZipEntry(String name) 
    Creates a new ZipEntry object for the specified entry name.
 public ZipEntry getNextEntry() throws IOException 
    Reads the next ZIP file entry and positions the stream at the beginning of the entry data.
 public int read(byte[] b,
    int off,
    int len) throws IOException 
    Reads from the current ZIP entry into an array of bytes. If len is not zero, the method blocks until some input is available; otherwise, no bytes are read and 0 is returned.
 public long skip(long n) throws IOException 
    Skips specified number of bytes in the current ZIP entry.