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, skip
public ThrottledInputStream(InputStream rawStream)
public ThrottledInputStream(InputStream rawStream, long maxBytesPerSec)
public void close() throws IOException
close
在接口中 Closeable
close
在接口中 AutoCloseable
close
在类中 InputStream
IOException
public int read() throws IOException
read
在类中 InputStream
IOException
public int read(byte[] b) throws IOException
read
在类中 InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
在类中 InputStream
IOException
public long getTotalBytesRead()
public long getBytesPerSec()
public long getTotalSleepTime()
Copyright © 2009 The Apache Software Foundation