|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.zip.ZipFile
java.util.jar.JarFile
public class JarFile
JarFile is used to read jar entries and their associated data from jar files.
JarInputStream,
JarEntry| Nested Class Summary | |
|---|---|
(package private) static class |
JarFile.JarFileInputStream
|
| Field Summary | |
|---|---|
static String |
MANIFEST_NAME
|
(package private) static String |
META_DIR
|
(package private) JarVerifier |
verifier
|
| Fields inherited from class java.util.zip.ZipFile |
|---|
OPEN_DELETE, OPEN_READ |
| 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 | |
|---|---|
JarFile(File file)
Create a new JarFile using the contents of file. |
|
JarFile(File file,
boolean verify)
Create a new JarFile using the contents of file. |
|
JarFile(File file,
boolean verify,
int mode)
Create a new JarFile using the contents of file. |
|
JarFile(String filename)
Create a new JarFile from the contents of the file specified by filename. |
|
JarFile(String filename,
boolean verify)
Create a new JarFile from the contents of the file specified by filename. |
|
| Method Summary | |
|---|---|
void |
close()
Close the Zip file. |
Enumeration<JarEntry> |
entries()
Return an enumeration containing the JarEntrys contained in this JarFile. |
ZipEntry |
getEntry(String name)
Return the JarEntry specified by name or null if no such entry exists |
InputStream |
getInputStream(ZipEntry ze)
Return an InputStream for reading the decompressed contents of ze. |
JarEntry |
getJarEntry(String name)
Return the JarEntry specified by name or null if no such entry exists. |
Manifest |
getManifest()
Returns the Manifest object associated with this JarFile or null if no manifest entry exists. |
| Methods inherited from class java.util.zip.ZipFile |
|---|
finalize, getName, size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MANIFEST_NAME
static final String META_DIR
JarVerifier verifier
| Constructor Detail |
|---|
public JarFile(File file)
throws IOException
file - java.io.File
IOException - If the file cannot be read.
public JarFile(File file,
boolean verify)
throws IOException
file - java.io.Fileverify - verify a signed jar file
IOException - If the file cannot be read.
public JarFile(File file,
boolean verify,
int mode)
throws IOException
file - java.io.Fileverify - verify a signed jar filemode - the mode to use, either OPEN_READ or OPEN_READ | OPEN_DELETE
IOException - If the file cannot be read.
public JarFile(String filename)
throws IOException
filename - java.lang.String
IOException - If fileName cannot be opened for reading.
public JarFile(String filename,
boolean verify)
throws IOException
filename - java.lang.Stringverify - verify a signed jar file
IOException - If fileName cannot be opened for reading.| Method Detail |
|---|
public Enumeration<JarEntry> entries()
entries in class ZipFileIllegalStateException - If this JarFile has been closed.public JarEntry getJarEntry(String name)
name - the name of the entry in the jar file
public Manifest getManifest()
throws IOException
IOException
public InputStream getInputStream(ZipEntry ze)
throws IOException
getInputStream in class ZipFileze - the ZipEntry to read from
IOException - If an error occured while creating the InputStream.public ZipEntry getEntry(String name)
getEntry in class ZipFilename - the name of the entry in the jar file
public void close()
throws IOException
ZipFile
close in class ZipFileIOException
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||