public class LimitInputStream extends CountingInputStream
countin| Constructor and Description |
|---|
LimitInputStream(InputStream in,
long max) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
int |
read() |
int |
read(byte[] buf,
int off,
int len) |
long |
skip(long n) |
getReadclose, mark, markSupported, read, resetpublic LimitInputStream(InputStream in, long max)
max - max number of bytes to readpublic int available()
throws IOException
available in class FilterInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class CountingInputStreamIOExceptionpublic int read()
throws IOException
read in class CountingInputStreamIOExceptionpublic int read(byte[] buf,
int off,
int len)
throws IOException
read in class CountingInputStreamIOException