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, reset
public 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 FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public long skip(long n) throws IOException
skip
in class FilterInputStream
IOException
public long getPos()
Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow