protected static class ThrottledFetcher.ThrottledInputstream extends InputStream
| Modifier and Type | Field and Description |
|---|---|
protected InputStream |
inputStream
The stream we are wrapping.
|
protected IStreamThrottler |
streamThrottler
Stream throttler
|
protected ThrottledFetcher.ThrottledConnection |
throttledConnection
Throttled connection
|
| Constructor and Description |
|---|
ThrottledFetcher.ThrottledInputstream(ThrottledFetcher.ThrottledConnection throttledConnection,
IStreamThrottler streamThrottler,
InputStream is)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Get available.
|
protected int |
basicRead(byte[] b,
int off,
int len,
int totalSoFar)
Basic read, which uses the server object to throttle activity.
|
void |
close()
Close.
|
void |
mark(int readLimit)
Mark.
|
boolean |
markSupported()
Check if mark is supported.
|
int |
read()
Read a byte.
|
int |
read(byte[] b)
Read lots of bytes.
|
int |
read(byte[] b,
int off,
int len)
Read lots of specific bytes.
|
void |
reset()
Reset.
|
long |
skip(long n)
Skip
|
protected final ThrottledFetcher.ThrottledConnection throttledConnection
protected final IStreamThrottler streamThrottler
protected final InputStream inputStream
public ThrottledFetcher.ThrottledInputstream(ThrottledFetcher.ThrottledConnection throttledConnection, IStreamThrottler streamThrottler, InputStream is)
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 InputStreamIOExceptionprotected int basicRead(byte[] b,
int off,
int len,
int totalSoFar)
throws IOException
IOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic void mark(int readLimit)
mark in class InputStreampublic void reset()
throws IOException
reset in class InputStreamIOExceptionpublic boolean markSupported()
markSupported in class InputStreampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOException