public class CountingInputStream extends FilterInputStream
| Modifier and Type | Field and Description |
|---|---|
protected long |
count
number of bytes read or skipped
|
in| Constructor and Description |
|---|
CountingInputStream(InputStream _in)
Constructor - Calls Super Class
|
CountingInputStream(InputStream _in,
long offset)
Constructor - Calls Super Class
|
| Modifier and Type | Method and Description |
|---|---|
long |
getPos()
Returns the Position in the Stream
|
int |
read()
Reads the Next Byte from the Stream
|
int |
read(byte[] b,
int off,
int len)
Reads the next Byte Array with Offset and Length from the Stream
|
long |
skip(long n)
Calls Skip(long n)
|
available, close, mark, markSupported, read, resetpublic CountingInputStream(InputStream _in)
_in - InputStream to wrappublic CountingInputStream(InputStream _in, long offset)
_in - InputStream to wrapoffset - Offset in bytes for which the counter should startpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionpublic long getPos()
Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow