Spec-Zone .ru
спецификации, руководства, описания, API
|
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.zip.ZipFile
This class is used to read entries from a zip file.
Fields inherited from interface java.util.zip.ZipConstants |
CENATT,
CENATX,
CENCOM,
CENCRC,
CENDSK,
CENEXT,
CENFLG,
CENHDR,
CENHOW,
CENLEN,
CENNAM,
CENOFF,
CENSIG,
CENSIZ,
CENTIM,
CENVEM,
CENVER,
ENDCOM,
ENDHDR,
ENDOFF,
ENDSIG,
ENDSIZ,
ENDSUB,
ENDTOT,
EXTCRC,
EXTHDR,
EXTLEN,
EXTSIG,
EXTSIZ,
LOCCRC,
LOCEXT,
LOCFLG,
LOCHDR,
LOCHOW,
LOCLEN,
LOCNAM,
LOCSIG,
LOCSIZ,
LOCTIM,
LOCVER |
Constructor Summary | |
ZipFile(File file)
Opens a ZIP file for reading given the specified File object. |
|
ZipFile(String name)
Opens a zip file for reading. |
Method Summary | |
void |
close()
Closes the ZIP file. |
Enumeration |
entries()
Returns an enumeration of the ZIP file entries. |
ZipEntry |
getEntry(String name)
Returns the zip file entry for the specified name, or null if not found. |
InputStream |
getInputStream(ZipEntry entry)
Returns an input stream for reading the contents of the specified zip file entry. |
String |
getName()
Returns the path name of the ZIP file. |
int |
size()
Returns the number of entries in the ZIP file. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ZipFile(String name) throws IOException
First, if there is a security
manager, its checkRead
method
is called with the name
argument
as its argument to ensure the read is allowed.
name
- the name of the zip filecheckRead
method doesn't allow read access to the file.SecurityManager.checkRead(java.lang.String)
public ZipFile(File file) throws ZipException, IOException
file
- the ZIP file to be opened for readingMethod Detail |
public ZipEntry getEntry(String name)
name
- the name of the entrypublic InputStream getInputStream(ZipEntry entry) throws IOException
entry
- the zip file entrypublic String getName()
public Enumeration entries()
public int size()
public void close() throws IOException
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |