CountingReaderInputStream

An input stream that reads the data from a reader and limits the number of bytes that can be read.

Methods
void close()
void close() throws IOException
long getLength()
The number of characters read so far (but there might still be some bytes in the buffer).
long getLength()
The number of characters read so far (but there might still be some bytes in the buffer).
Returns:
the number of characters
int read(byte[] buff, int offset, int len)
int read(byte[] buff, int offset, int len) throws IOException
int read()
int read() throws IOException