Unless otherwise noted, passing a null
argument to a constructor
or method in this class will cause a NullPointerException
to be
thrown.
API Note
To release resources used by this ZipFile
, the close()
method
should be called explicitly or by try-with-resources. Subclasses are responsible
for the cleanup of resources acquired by the subclass. Subclasses that override
finalize()
in order to perform cleanup should be modified to use alternative
cleanup mechanisms such as java.
and remove the overriding
finalize
method.
Modifier and Type | Class and Description |
---|---|
private static class | |
private class | |
private static class | |
private static class | |
private class | |
private class | |
private class |
Modifier and Type | Field and Description |
---|---|
private volatile boolean | |
private static final int | |
private static final boolean | DISABLE_ZIP64_EXTRA_VALIDATION
Flag to specify whether the Extra ZIP64 validation should be disabled. |
private final String | |
private final String | |
private String | |
private int | |
public static final int | OPEN_DELETE
Mode flag to open a ZIP file and mark it for deletion. |
public static final int | OPEN_READ
Mode flag to open a ZIP file for reading. |
private final ZipFile. | |
private static final int |
Access | Constructor and Description |
---|---|
public | |
public | |
public | |
public | ZipFile(File
the ZIP file to be opened for reading file, int the mode in which the file is to be opened mode, Charset the charset to
be used to decode the ZIP entry name and comment that are not
encoded by using UTF-8 encoding (indicated by entry's general
purpose flag). charset)Opens a new |
public | |
public | ZipFile(File
the ZIP file to be opened for reading file, Charset The charset to be
used to decode the ZIP entry name and comment (ignored if
the language
encoding bit of the ZIP entry's general purpose bit
flag is set). charset)Opens a ZIP file for reading given the specified File object. |
Modifier and Type | Method and Description |
---|---|
public void | |
private void | |
private void | |
public Enumeration | Returns: an enumeration of the ZIP file entriesReturns an enumeration of the ZIP file entries. |
private Stream | |
public String | Returns: the comment string for the ZIP file, or null if noneReturns the ZIP file comment. |
pack-priv static boolean | getDisableZip64ExtraFieldValidation()
Returns the value of the System property which indicates whether the Extra ZIP64 validation should be disabled. |
public ZipEntry | |
private String | |
public InputStream | Returns: the input stream for reading the contents of the specified ZIP file entry or null if the ZIP file entry does not exist within the ZIP file.the ZIP file entry entry)Returns an input stream for reading the contents of the specified ZIP file entry. |
private List | getManifestAndSignatureRelatedFiles()
Returns the names of the META-INF/MANIFEST.MF entry - if exists - and any signature-related files under META-INF. |
private String | getManifestName(boolean onlyIfSignatureRelatedFiles)
Returns the name of the META-INF/MANIFEST.MF entry, ignoring case. |
private int | |
private int[] | getMetaInfVersions()
Returns the versions for which there exists a non-directory entry that begin with "META-INF/versions/" (case ignored). |
public String | |
private ZipEntry | |
private Enumeration | |
private Stream | |
public int | |
public Stream | Returns: an orderedStream of entries in this ZIP fileReturns an ordered |
public String | Returns: a string identifying thisZipFile , for debuggingOverrides java. Returns a string identifying this |