java.util.jar
Class Manifest.FastInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byjava.util.jar.Manifest.FastInputStream
Enclosing class:
Manifest

static class Manifest.FastInputStream
extends FilterInputStream


Field Summary
private  byte[] buf
           
private  int count
           
private  int pos
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Fields inherited from class java.io.InputStream
 
Constructor Summary
(package private) Manifest.FastInputStream(InputStream in)
           
(package private) Manifest.FastInputStream(InputStream in, int size)
           
 
Method Summary
 int available()
          Returns the number of bytes that can be read from this input stream without blocking.
 void close()
          Closes this input stream and releases any system resources associated with the stream.
private  void fill()
           
 byte peek()
           
 int read()
          Reads the next byte of data from this input stream.
 int read(byte[] b, int off, int len)
          Reads up to len bytes of data from this input stream into an array of bytes.
 int readLine(byte[] b)
           
 int readLine(byte[] b, int off, int len)
           
 long skip(long n)
          Skips over and discards n bytes of data from the input stream.
 
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
 

Field Detail

buf

private byte[] buf

count

private int count

pos

private int pos
Constructor Detail

Manifest.FastInputStream

Manifest.FastInputStream(InputStream in)

Manifest.FastInputStream

Manifest.FastInputStream(InputStream in,
                         int size)
Method Detail

read

public int read()
         throws IOException
Description copied from class: FilterInputStream
Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

This method simply performs in.read() and returns the result.

Overrides:
read in class FilterInputStream
Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Description copied from class: FilterInputStream
Reads up to len bytes of data from this input stream into an array of bytes. This method blocks until some input is available.

This method simply performs in.read(b, off, len) and returns the result.

Overrides:
read in class FilterInputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

readLine

public int readLine(byte[] b,
                    int off,
                    int len)
             throws IOException
Throws:
IOException

peek

public byte peek()
          throws IOException
Throws:
IOException

readLine

public int readLine(byte[] b)
             throws IOException
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Description copied from class: FilterInputStream
Skips over and discards n bytes of data from the input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. The actual number of bytes skipped is returned.

This method simply performs in.skip(n).

Overrides:
skip in class FilterInputStream
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
IOException - if an I/O error occurs.

available

public int available()
              throws IOException
Description copied from class: FilterInputStream
Returns the number of bytes that can be read from this input stream without blocking.

This method simply performs in.available() and returns the result.

Overrides:
available in class FilterInputStream
Returns:
the number of bytes that can be read from the input stream without blocking.
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

close

public void close()
           throws IOException
Description copied from class: FilterInputStream
Closes this input stream and releases any system resources associated with the stream. This method simply performs in.close().

Overrides:
close in class FilterInputStream
Throws:
IOException - if an I/O error occurs.
See Also:
FilterInputStream.in

fill

private void fill()
           throws IOException
Throws:
IOException