java.util.jar
Class JarInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--java.util.zip.InflaterInputStream
|
+--java.util.zip.ZipInputStream
|
+--java.util.jar.JarInputStream
InputStream for reading jar files.
XXX - verification of the signatures in the Manifest file is not yet
implemented.
Since:Author:- Mark Wielaard (mark@klomp.org)
JarInputStream
public JarInputStream(java.io.InputStream in)
Creates a new JarInputStream and tries to read the manifest.
If such a manifest is present the JarInputStream tries to verify all
the entry signatures while reading.
Parameters:
Throws:
IOException
- when an error occurs when opening or reading
JarInputStream
public JarInputStream(java.io.InputStream in, boolean verify)
Creates a new JarInputStream and tries to read the manifest.
If such a manifest is present and verify is true, the JarInputStream
tries to verify all the entry signatures while reading.
Parameters:
Throws:
IOException
- when an error occurs when opening or reading
createZipEntry
protected ZipEntry createZipEntry(java.lang.String name)
Creates a JarEntry for a particular name and consults the manifest
for the Attributes of the entry.
Used by ZipEntry.getNextEntry()
Parameters:
getManifest
public Manifest getManifest()
Returns the Manifest for the jar file or null if there was no Manifest.
getNextEntry
public ZipEntry getNextEntry()
Returns the next entry or null when there are no more entries.
Does actually return a JarEntry, if you don't want to cast it yourself
use getNextJarEntry()
. Does not return any entries found
at the beginning of the ZipFile that are special
(those that start with "META-INF/").
Throws:
IOException
- if an IO error occurs when reading the entry
getNextJarEntry
public JarEntry getNextJarEntry()
Returns the next jar entry or null when there are no more entries.
Throws:
IOException
- if an IO error occurs when reading the entry
read
public int read(byte[] , int off, int len)
XXX
Parameters:
Returns:
Throws: