public class SpeedLimitInputStream extends InputStream
| 构造器和说明 |
|---|
SpeedLimitInputStream(InputStream inputStream) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
limit(int length)
限速下载操作
|
void |
mark(int readlimit) |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
void |
setMaxDownloadSpeed(int setMaxDownloadSpeed)
设置最大下载速率(kb/s)
|
available, close, markSupported, skippublic SpeedLimitInputStream(InputStream inputStream)
public void setMaxDownloadSpeed(int setMaxDownloadSpeed)
public void limit(int length)
public int read()
throws IOException
read 在类中 InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read 在类中 InputStreamIOExceptionpublic void mark(int readlimit)
mark 在类中 InputStreampublic void reset()
throws IOException
reset 在类中 InputStreamIOExceptionCopyright © 2021. All rights reserved.