Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.imagero.uio.io
Class LimitedInputStream  view LimitedInputStream download LimitedInputStream.java

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended bycom.imagero.uio.io.LimitedInputStream
All Implemented Interfaces:
java.io.Closeable

public class LimitedInputStream
extends java.io.FilterInputStream

InputStream that reads specified number of bytes


Field Summary
protected  int limit
           
(package private)  int mark
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
LimitedInputStream(java.io.InputStream in, int limit)
          create new LimitedInputStream
 
Method Summary
 int available()
          Calls the in.available() method.
 void mark(int readlimit)
          Calls the in.mark(int) method.
 int read()
          Calls the in.read() method
 int read(byte[] b)
          Calls the read(byte[], int, int) overloaded method.
 int read(byte[] b, int off, int len)
          Calls the in.read(byte[], int, int) method.
 void reset()
          Calls the in.reset() method.
 long skip(long n)
          Calls the in.skip(long) method
 
Methods inherited from class java.io.FilterInputStream
close, markSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

limit

protected int limit

mark

int mark
Constructor Detail

LimitedInputStream

public LimitedInputStream(java.io.InputStream in,
                          int limit)
create new LimitedInputStream

Method Detail

available

public int available()
              throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the in.available() method.


read

public int read()
         throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the in.read() method


read

public int read(byte[] b)
         throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the read(byte[], int, int) overloaded method. Note that this method does not redirect its call directly to a corresponding method in in. This allows subclasses to override only the three argument version of read.


read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the in.read(byte[], int, int) method.


skip

public long skip(long n)
          throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the in.skip(long) method


mark

public void mark(int readlimit)
Description copied from class: java.io.FilterInputStream
Calls the in.mark(int) method.


reset

public void reset()
           throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the in.reset() method.