Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
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


public class JarInputStream

extends ZipInputStream

InputStream for reading jar files. XXX - verification of the signatures in the Manifest file is not yet implemented.

Since:Author:

Constructor Summary

JarInputStream(java.io.InputStream in)

Creates a new JarInputStream and tries to read the manifest.
JarInputStream(java.io.InputStream in, boolean verify)

Creates a new JarInputStream and tries to read the manifest.

Method Summary

java.util.zip.ZipEntrycreateZipEntry(java.lang.String name)

Creates a JarEntry for a particular name and consults the manifest for the Attributes of the entry.
java.util.jar.ManifestgetManifest()

Returns the Manifest for the jar file or null if there was no Manifest.
java.util.zip.ZipEntrygetNextEntry()

Returns the next entry or null when there are no more entries.
java.util.jar.JarEntrygetNextJarEntry()

Returns the next jar entry or null when there are no more entries.
intread(byte[] , int off, int len)

XXX

Constructor Details

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:


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:


Method Details

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:


getNextJarEntry

public JarEntry getNextJarEntry()

Returns the next jar entry or null when there are no more entries.

Throws:


read

public int read(byte[] , int off, int len)

XXX

Parameters:

Returns:

Throws: