public class CountingInputStream extends FilterInputStream
in
Constructor and Description |
---|
CountingInputStream(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) |
available, close, mark, markSupported, reset, skip
public CountingInputStream(InputStream in)
public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b) throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
protected final void count(long read)
read
- the number of bytes readpublic long getBytesRead()
Copyright © 2016 The Apache Software Foundation. All rights reserved.