| 
JavaTM 2 Platform Std. Ed. v1.4.2  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.util.zip.InflaterInputStream
java.util.zip.ZipInputStream
java.util.jar.JarInputStream
The JarInputStream class is used to read the contents of
 a JAR file from any input stream. It extends the class
 java.util.zip.ZipInputStream with support for reading
 an optional Manifest entry. The Manifest
 can be used to store meta-information about the JAR file and its entries.
Manifest, 
ZipInputStream| Field Summary | 
| Fields inherited from class java.util.zip.ZipInputStream | 
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 | 
| Fields inherited from class java.util.zip.InflaterInputStream | 
buf, inf, len | 
| Fields inherited from class java.io.FilterInputStream | 
in | 
| Constructor Summary | |
JarInputStream(InputStream in)
Creates a new JarInputStream and reads the optional
 manifest. | 
|
JarInputStream(InputStream in,
               boolean verify)
Creates a new JarInputStream and reads the optional
 manifest. | 
|
| Method Summary | |
protected  ZipEntry | 
createZipEntry(String name)
Creates a new JarEntry (ZipEntry) for the
 specified JAR file entry name. | 
 Manifest | 
getManifest()
Returns the Manifest for this JAR file, or
 null if none. | 
 ZipEntry | 
getNextEntry()
Reads the next ZIP file entry and positions stream at the beginning of the entry data.  | 
 JarEntry | 
getNextJarEntry()
Reads the next JAR file entry and positions the stream at the beginning of the entry data.  | 
 int | 
read(byte[] b,
     int off,
     int len)
Reads from the current JAR file entry into an array of bytes.  | 
| Methods inherited from class java.util.zip.ZipInputStream | 
available, close, closeEntry, skip | 
| Methods inherited from class java.util.zip.InflaterInputStream | 
fill, read | 
| Methods inherited from class java.io.FilterInputStream | 
mark, markSupported, read, reset | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public JarInputStream(InputStream in)
               throws IOException
JarInputStream and reads the optional
 manifest. If a manifest is present, also attempts to verify
 the signatures if the JarInputStream is signed.
in - the actual input stream
IOException - if an I/O error has occurred
public JarInputStream(InputStream in,
                      boolean verify)
               throws IOException
JarInputStream and reads the optional
 manifest. If a manifest is present and verify is true, also attempts 
 to verify the signatures if the JarInputStream is signed.
in - the actual input streamverify - whether or not to verify the JarInputStream if
 it is signed.
IOException - if an I/O error has occurred| Method Detail | 
public Manifest getManifest()
Manifest for this JAR file, or
 null if none.
Manifest for this JAR file, or
         null if none.
public ZipEntry getNextEntry()
                      throws IOException
getNextEntry in class ZipInputStreamZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred
public JarEntry getNextJarEntry()
                         throws IOException
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred
public int read(byte[] b,
                int off,
                int len)
         throws IOException
read in class ZipInputStreamb - the buffer into which the data is readoff - the start offset of the datalen - the maximum number of bytes to read
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurredprotected ZipEntry createZipEntry(String name)
JarEntry (ZipEntry) for the
 specified JAR file entry name.
createZipEntry in class ZipInputStreamname - the name of the JAR/ZIP file entry
JarEntry object just created
  | 
JavaTM 2 Platform Std. Ed. v1.4.2  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.