Build 1.0_r1(from source)

java.util.jar
Class JarInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.util.zip.InflaterInputStream
              extended by java.util.zip.ZipInputStream
                  extended by java.util.jar.JarInputStream
All Implemented Interfaces:
Closeable, ZipConstants

public class JarInputStream
extends ZipInputStream


Field Summary
 
Fields inherited from class java.util.zip.InflaterInputStream
buf, inf, len
 
Fields inherited from class java.io.FilterInputStream
in
 
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
JarInputStream(InputStream stream)
           
JarInputStream(InputStream stream, boolean verify)
          Constructs a new JarInputStream from stream
 
Method Summary
protected  ZipEntry createZipEntry(String name)
           
 Manifest getManifest()
          Returns the Manifest object associated with this JarInputStream or null if no manifest entry exists.
 ZipEntry getNextEntry()
          Returns the next ZipEntry contained in this stream or null if no more entries are present.
 JarEntry getNextJarEntry()
          Returns the next JarEntry contained in this stream or null if no more entries are present.
 int read(byte[] buffer, int offset, int length)
          Reads up to the specified number of uncompressed bytes into the buffer starting at the offset.
 
Methods inherited from class java.util.zip.ZipInputStream
available, close, closeEntry, skip
 
Methods inherited from class java.util.zip.InflaterInputStream
fill, mark, markSupported, read, reset
 
Methods inherited from class java.io.FilterInputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarInputStream

public JarInputStream(InputStream stream,
                      boolean verify)
               throws IOException
Constructs a new JarInputStream from stream

Throws:
IOException

JarInputStream

public JarInputStream(InputStream stream)
               throws IOException
Throws:
IOException
Method Detail

getManifest

public Manifest getManifest()
Returns the Manifest object associated with this JarInputStream or null if no manifest entry exists.

Returns:
java.util.jar.Manifest

getNextJarEntry

public JarEntry getNextJarEntry()
                         throws IOException
Returns the next JarEntry contained in this stream or null if no more entries are present.

Returns:
java.util.jar.JarEntry
Throws:
IOException - If an error occurs while reading the entry

read

public int read(byte[] buffer,
                int offset,
                int length)
         throws IOException
Description copied from class: ZipInputStream
Reads up to the specified number of uncompressed bytes into the buffer starting at the offset.

Overrides:
read in class ZipInputStream
Parameters:
buffer - a byte array
offset - the starting offset into the buffer
length - the number of bytes to read
Returns:
the number of bytes read
Throws:
IOException - If an error occurs reading

getNextEntry

public ZipEntry getNextEntry()
                      throws IOException
Returns the next ZipEntry contained in this stream or null if no more entries are present.

Overrides:
getNextEntry in class ZipInputStream
Returns:
java.util.zip.ZipEntry
Throws:
IOException - If an error occurs while reading the entry

createZipEntry

protected ZipEntry createZipEntry(String name)
Overrides:
createZipEntry in class ZipInputStream

Build 1.0_r1(from source)

Please submit a feedback, bug or feature