com.imagero.uio.io
Class LimitedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.imagero.uio.io.LimitedInputStream
- public class LimitedInputStream
- extends java.io.FilterInputStream
InputStream that reads specified number of bytes
Field Summary |
protected int |
limit
|
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary |
LimitedInputStream(java.io.InputStream in,
int limit)
create new LimitedInputStream |
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 |
limit
protected int limit
LimitedInputStream
public LimitedInputStream(java.io.InputStream in,
int limit)
- create new LimitedInputStream
- Parameters:
in
- InputStreamlimit
- read limit
available
public int available()
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read()
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read(byte[] b)
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
skip
public long skip(long n)
throws java.io.IOException
- Throws:
java.io.IOException
mark
public void mark(int readlimit)
reset
public void reset()
throws java.io.IOException
- Throws:
java.io.IOException