Build 1.0_r1(from source)

java.util.jar
Class JarFile.JarFileInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.util.jar.JarFile.JarFileInputStream
All Implemented Interfaces:
Closeable
Enclosing class:
JarFile

static final class JarFile.JarFileInputStream
extends FilterInputStream


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
JarFile.JarFileInputStream(InputStream is, ZipEntry ze, JarVerifier ver)
           
 
Method Summary
 int read()
          Reads a single byte from this FilterInputStream and returns the result as an int.
 int read(byte[] buf, int off, int nbytes)
          Reads at most count bytes from this FilterInputStream and stores them in byte array buffer starting at offset.
 long skip(long nbytes)
          Skips count number of bytes in this InputStream.
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarFile.JarFileInputStream

JarFile.JarFileInputStream(InputStream is,
                           ZipEntry ze,
                           JarVerifier ver)
Method Detail

read

public int read()
         throws IOException
Description copied from class: FilterInputStream
Reads a single byte from this FilterInputStream and returns the result as an int. The low-order byte is returned or -1 of the end of stream was encountered. This implementation returns a byte from the target stream.

Overrides:
read in class FilterInputStream
Returns:
the byte read or -1 if end of stream.
Throws:
IOException - If the stream is already closed or another IOException occurs.

read

public int read(byte[] buf,
                int off,
                int nbytes)
         throws IOException
Description copied from class: FilterInputStream
Reads at most count bytes from this FilterInputStream and stores them in byte array buffer starting at offset. Answer the number of bytes actually read or -1 if no bytes were read and end of stream was encountered. This implementation reads bytes from the target stream.

Overrides:
read in class FilterInputStream
Parameters:
buf - the byte array in which to store the read bytes.
off - the offset in buffer to store the read bytes.
nbytes - the maximum number of bytes to store in buffer.
Returns:
the number of bytes actually read or -1 if end of stream.
Throws:
IOException - If the stream is already closed or another IOException occurs.

skip

public long skip(long nbytes)
          throws IOException
Description copied from class: FilterInputStream
Skips count number of bytes in this InputStream. Subsequent read()'s will not return these bytes unless reset() is used. This implementation skips count number of bytes in the target stream.

Overrides:
skip in class FilterInputStream
Parameters:
nbytes - the number of bytes to skip.
Returns:
the number of bytes actually skipped.
Throws:
IOException - If the stream is already closed or another IOException occurs.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature