| |
|
| java.lang.Object java.util.zip.ZipFile
All known Subclasses: java.util.jar.JarFile,
Constructor Summary | |
public | ZipFile(File file) Constructs a new ZipFile opened on the specified File. | public | ZipFile(File file, int mode) Constructs a new ZipFile opened on the specified file using the specified
mode. | public | ZipFile(String filename) Constructs a new ZipFile opened on the specified file path name. |
OPEN_DELETE | final public static int OPEN_DELETE(Code) | | Delete ZIP file when closed.
|
OPEN_READ | final public static int OPEN_READ(Code) | | Open ZIP file for read.
|
descriptor | long descriptor(Code) | | |
ZipFile | public ZipFile(File file) throws ZipException, IOException(Code) | | Constructs a new ZipFile opened on the specified File.
Parameters: file - the File throws: ZipException - if a ZIP format exception occurs reading the file throws: IOException - if an IO exception occurs reading the file |
ZipFile | public ZipFile(File file, int mode) throws IOException(Code) | | Constructs a new ZipFile opened on the specified file using the specified
mode.
Parameters: file - the file Parameters: mode - the mode to use, either OPEN_READ orOPEN_READ | OPEN_DELETE throws: IOException - if an IO exception occurs reading the file |
ZipFile | public ZipFile(String filename) throws IOException(Code) | | Constructs a new ZipFile opened on the specified file path name.
Parameters: filename - the file path name throws: IOException - if an IO exception occured reading the file |
close | public synchronized void close() throws IOException(Code) | | Closes this ZipFile.
throws: IOException - if an IO exception occured closing the file |
entries | public Enumeration<? extends ZipEntry> entries()(Code) | | Answers all of the ZIP entries contained in this ZipFile.
an Enumeration of the ZIP entries |
getEntry | public ZipEntry getEntry(String entryName)(Code) | | Gets the zip entry with the specified name from this ZipFile.
Parameters: entryName - the name of the entry in the zip file a ZipEntry or null if the entry name does not exist in the zipfile |
getInputStream | public InputStream getInputStream(ZipEntry entry) throws IOException(Code) | | Answers an input stream on the data of the specified ZipEntry.
Parameters: entry - the ZipEntry an input stream on the ZipEntry data throws: IOException - if an IO exception occurs reading the data |
getName | public String getName()(Code) | | Gets the file name of this ZipFile.
the file name of this ZipFile |
size | public int size()(Code) | | Returns the number of ZipEntries in this ZipFile.
Number of entries in this file |
|
|
|