java.util.zip
public class ZipInputStream extends InflaterInputStream implements ZipConstants
Constructor Summary | |
---|---|
ZipInputStream(InputStream in)
Creates a new Zip input stream, reading a zip archive. |
Method Summary | |
---|---|
int | available() |
void | close()
Closes the zip file. |
void | closeEntry()
Closes the current zip entry and moves to the next one. |
protected ZipEntry | createZipEntry(String name)
Creates a new zip entry for the given name. |
ZipEntry | getNextEntry()
Open the next entry from the zip archive, and return its description.
|
int | read()
Reads a byte from the current zip entry. |
int | read(byte[] b, int off, int len)
Reads a block of bytes from the current zip entry. |
Throws: IOException if a i/o error occured.
Parameters: name the name of the zip entry.
Returns: the byte or -1 on EOF.
Throws: IOException if a i/o error occured. ZipException if the deflated stream is corrupted.
Returns: the number of bytes read (may be smaller, even before EOF), or -1 on EOF.
Throws: IOException if a i/o error occured. ZipException if the deflated stream is corrupted.