@NotThreadSafe public class ThrottledInputStream extends FilterInputStream
InputStream.in| Constructor and Description |
|---|
ThrottledInputStream(InputStream in,
Limiter limiter,
MeteredInputStream meter)
Builds a
ThrottledInputStream. |
| Modifier and Type | Method and Description |
|---|---|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
available, close, mark, markSupported, skippublic ThrottledInputStream(InputStream in, Limiter limiter, MeteredInputStream meter)
ThrottledInputStream.
It is recommended to use a StreamThrottler for creation of ThrottledInputStreams.in - InputStream to throttle.limiter - Limiter to use for throttling.meter - MeteredInputStream used to measure the InputStream. Note the MeteredInputStream
MUST be in the FilterInputStream chain of FilterInputStream.in.public int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic void reset()
throws IOException
reset in class FilterInputStreamIOException