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, skip
public CountingInputStream(InputStream in)
CountingInputStream
wrapping the supplied
input stream.public int read() throws IOException
read
in class InputStream
IOException
public int getCounter()
public void resetCounter()
Copyright © 2019 Eclipse Paho. All rights reserved.