java.util.zip.ZipInputStream
java.util.zip.InflaterInputStream
None
None
New as of JDK 1.1
The ZipInputStream class reads files that have been compressed using the ZIP format. To read uncompressed data from a ZIP file, simply construct a ZipInputStream that wraps a regular input stream. The getNextEntry() method returns each entry in the ZIP file in order. Once you have a ZipEntry object, you use the read() method to retrieve uncompressed data from it. If you want to read the entries in a nonsequential order, use a ZipFile instead.
public class java.util.zip.ZipInputStream extends java.util.zip.InflaterInputStream { // Constructors public ZipInputStream(InputStream in); // Instance Methods public void close(); public void closeEntry(); public ZipEntry getNextEntry(); public int read(byte[] b, int off, int len); public long skip(long n); }
The underlying input stream.
This constructor creates a ZipInputStream that inflates data from the given InputStream.
If any I/O error occurs.
FilterInputStream.close()
This method closes this stream and releases any system resources that are associated with it.
If a ZIP file format error occurs.
If any other kind of I/O error occurs.
This method closes the currently open entry in the ZIP file. The stream is then positioned to read the next entry using getNextEntry().
The ZipEntry for the next entry or null if there are no more entries.
If a ZIP file format error occurs.
If any other kind of I/O error occurs.
This method returns a ZipEntry that represents the next entry in the ZIP file and positions the stream to read that entry.
An array of bytes to be filled from the stream.
An offset into the byte array.
The number of bytes to read.
The number of bytes read or -1 if the end of the entry is encountered immediately.
If a ZIP file format error occurs.
If any other kind of I/O error occurs.
InflaterInputStream.read(byte[], int, int)
This method reads enough data from the underlying InputStream to return len bytes of uncompressed data. The uncompressed data is placed into the given array starting at off. The method blocks until some data is available for decompression.
The actual number of bytes skipped.
If a ZIP file format error occurs.
If any kind of I/O error occurs.
InflaterInputStream.skip()
This method skips over the specified number of uncompressed data bytes by reading data from the underlying InputStream and decompressing it.
Method |
Inherited From |
Method |
Inherited From |
---|---|---|---|
available() |
FilterInputStream |
clone() |
Object |
equals(Object) |
Object |
finalize() |
Object |
getClass() |
Object |
hashCode() |
Object |
mark(int) |
FilterInputStream |
markSupported() |
FilterInputStream |
notify() |
Object |
notifyAll() |
Object |
read() |
InflaterInputStream |
read(byte[]) |
FilterInputStream |
reset() |
FilterInputStream |
toString() |
Object |
wait() |
Object |
wait(long) |
Object |
wait(long, int) |
Object |
Inflater, InflaterInputStream, InputStream, IOException, ZipEntry, ZipException, ZipFile
This HTML Help has been published using the chm2web software. |