public class BandwidthLimitedInputStream extends FilterInputStream
in| Constructor and Description |
|---|
BandwidthLimitedInputStream(RouterContext context,
InputStream source,
RouterIdentity peer) |
BandwidthLimitedInputStream(RouterContext context,
InputStream source,
RouterIdentity peer,
boolean pullFromOutbound) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
read() |
int |
read(byte[] dest) |
int |
read(byte[] dest,
int off,
int len) |
long |
skip(long numBytes) |
available, mark, markSupported, resetpublic BandwidthLimitedInputStream(RouterContext context, InputStream source, RouterIdentity peer)
public BandwidthLimitedInputStream(RouterContext context, InputStream source, RouterIdentity peer, boolean pullFromOutbound)
pullFromOutbound - even though this is an input stream, if this is true, use the
context's outbound bandwidth limiter queue for delayspublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] dest)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] dest,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long numBytes)
throws IOException
skip in class FilterInputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOException