|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.InputStream
rabbit.io.MaxSizeInputStream
This class allows setting the size of the inputstream to a maximum nuber of bytes.
| Constructor Summary | |
MaxSizeInputStream(java.io.InputStream is,
long l)
Creates a new MaxSizeInputStream with a given limit on the given stream. |
|
| Method Summary | |
int |
available()
Get the number of bytes ready for reading. |
int |
read()
Reads the next byte of data from this input stream. |
int |
read(byte[] b)
Read a block of data (up to b.length bytes). |
int |
read(byte[] b,
int off,
int len)
Read a block of data (up to len bytes). |
long |
skip(long n)
Skip a number of bytes. |
| Methods inherited from class java.io.InputStream |
close, mark, markSupported, reset |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MaxSizeInputStream(java.io.InputStream is,
long l)
| Method Detail |
public int available()
throws java.io.IOException
java.io.IOException - if an I/O error occurs.
public int read()
throws java.io.IOException
java.io.IOException - if an I/O error occurs.
public int read(byte[] b)
throws java.io.IOException
java.io.IOException - if an I/O error occurs.
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOException - if an I/O error occurs.
public long skip(long n)
throws java.io.IOException
java.io.IOException - if an I/O error occurs.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||