public class LoggingInputStream extends BufferedInputStream
in
Constructor and Description |
---|
LoggingInputStream(InputStream in) |
Modifier and Type | Method and Description |
---|---|
void |
getInfo(long[] info)
Returns info as
[0] = current time in ms
[1] = elapsed time in ms since last call to getInfo(long[])
[2] = n_bytes_read since last call to getInfo(long[])
[3] = accumulated time in ms since last call to resetInfo()
[4] = accumulated bytes since last call to resetInfo()
So current speed = info[2]/info[1] Kb/s
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
resetInfo()
Put the counter to zero.
|
available, close, mark, markSupported, reset, skip
public LoggingInputStream(InputStream in)
public int read() throws IOException
read
in class BufferedInputStream
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 BufferedInputStream
IOException
public void resetInfo()
public void getInfo(long[] info)
Copyright © 2015–2021 Fiji. All rights reserved.