public class CountingInputStream
extends java.io.FilterInputStream
Modifier and Type | Field and Description |
---|---|
private long |
bytesRead |
Constructor and Description |
---|
CountingInputStream(java.io.InputStream in) |
Modifier and Type | Method and Description |
---|---|
protected void |
count(long read)
Increments the counter of already read bytes.
|
long |
getBytesRead()
Returns the current number of bytes read from this stream.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
protected final void count(long read)
read
- the number of bytes readpublic long getBytesRead()