protected static class ThrottledFetcher.ThrottledInputstream
extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
protected java.io.InputStream |
inputStream
The stream we are wrapping.
|
protected org.apache.manifoldcf.connectorcommon.interfaces.IStreamThrottler |
streamThrottler
Stream throttler
|
protected ThrottledFetcher.ThrottledConnection |
throttledConnection
The throttled connection we belong to
|
| Constructor and Description |
|---|
ThrottledInputstream(org.apache.manifoldcf.connectorcommon.interfaces.IStreamThrottler streamThrottler,
ThrottledFetcher.ThrottledConnection connection,
java.io.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 org.apache.manifoldcf.connectorcommon.interfaces.IStreamThrottler streamThrottler
protected final ThrottledFetcher.ThrottledConnection throttledConnection
protected final java.io.InputStream inputStream
public ThrottledInputstream(org.apache.manifoldcf.connectorcommon.interfaces.IStreamThrottler streamThrottler,
ThrottledFetcher.ThrottledConnection connection,
java.io.InputStream is)
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionprotected int basicRead(byte[] b,
int off,
int len,
int totalSoFar)
throws java.io.IOException
java.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void mark(int readLimit)
mark in class java.io.InputStreampublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStreampublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOException