public class LimitedInputStream extends FilterInputStream
FilterInputStream
实现in
Constructor and Description |
---|
LimitedInputStream(InputStream in,
long maxSize)
构造
|
Modifier and Type | Method and Description |
---|---|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long n) |
available, close, mark, markSupported, read, reset
public LimitedInputStream(InputStream in, long maxSize)
in
- InputStream
maxSize
- 限制最大读取量,单位bytepublic int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public long skip(long n) throws IOException
skip
in class FilterInputStream
IOException
Copyright © 2024. All rights reserved.