public class CountingInputStream extends InputStream
| Constructor and Description |
|---|
CountingInputStream(InputStream in)
Constructs a new
CountingInputStream wrapping the supplied
input stream. |
| Modifier and Type | Method and Description |
|---|---|
int |
getCounter()
Returns the number of bytes read since the last reset.
|
int |
read() |
void |
resetCounter()
Resets the counter to zero.
|
available, close, mark, markSupported, read, read, reset, skippublic CountingInputStream(InputStream in)
CountingInputStream wrapping the supplied
input stream.public int read()
throws IOException
read in class InputStreamIOExceptionpublic int getCounter()
public void resetCounter()
Copyright © 2018 Eclipse Paho. All Rights Reserved.