Contents
Class ThrottledInputStream
java.lang.Object
java.io.InputStream
ecmwf.common.technical.ThrottledInputStream
-
Constructor Summary
ConstructorsConstructorDescriptionThrottledInputStream
(InputStream inputStream) Instantiates a new throttled input stream.ThrottledInputStream
(InputStream inputStream, long maxBytesPerSec) Instantiates a new throttled input stream. -
Method Summary
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
Method Details
-
close
Close.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
read
Read.- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
Read.- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
Read.- Overrides:
read
in classInputStream
- Throws:
IOException
-
getTotalBytesRead
public long getTotalBytesRead()Gets the total bytes read.- Returns:
- the total bytes read
-
getBytesPerSec
public long getBytesPerSec()Return the number of bytes read per second.- Returns:
- the bytes per sec
-
getTotalSleepTime
public long getTotalSleepTime()Gets the total sleep time.- Returns:
- the total sleep time
-
toString
-