public class ThrottledInputStream extends InputStream
| Constructor and Description |
|---|
ThrottledInputStream(InputStream rawStream) |
ThrottledInputStream(InputStream rawStream,
long maxBytesPerSec) |
| Modifier and Type | Method and Description |
|---|---|
long |
getBytesPerSec()
Getter for the read-rate from this stream, since creation.
|
long |
getTotalBytesRead()
Getter for the number of bytes read from this stream, since creation.
|
long |
getTotalSleepTime()
Getter the total time spent in sleep.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
String |
toString() |
available, close, mark, markSupported, reset, skippublic ThrottledInputStream(InputStream rawStream)
public ThrottledInputStream(InputStream rawStream, long maxBytesPerSec)
public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long getTotalBytesRead()
public long getBytesPerSec()
public long getTotalSleepTime()
Copyright © 2013 Apache Software Foundation. All Rights Reserved.