public class ThrottledInputStream extends InputStream
| 构造器和说明 |
|---|
ThrottledInputStream(InputStream rawStream) |
ThrottledInputStream(InputStream rawStream,
long maxBytesPerSec) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
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, mark, markSupported, reset, skippublic ThrottledInputStream(InputStream rawStream)
public ThrottledInputStream(InputStream rawStream, long maxBytesPerSec)
public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 InputStreamIOExceptionpublic int read()
throws IOException
read 在类中 InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read 在类中 InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 InputStreamIOExceptionpublic long getTotalBytesRead()
public long getBytesPerSec()
public long getTotalSleepTime()
Copyright © 2009 The Apache Software Foundation