ReadCounter, Closeable, AutoCloseablepublic class LimitInputStream extends CountingInputStream
countin| Constructor | Description |
|---|---|
LimitInputStream(InputStream in,
long max) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
available() |
|
int |
read() |
|
int |
read(byte[] buf,
int off,
int len) |
|
long |
skip(long n) |
getReadclose, mark, markSupported, read, resetreadAllBytes, readNBytes, transferTopublic 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