Package i2p.susi.util
Class LimitInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
i2p.susi.util.CountingInputStream
i2p.susi.util.LimitInputStream
- All Implemented Interfaces:
ReadCounter,Closeable,AutoCloseable
public class LimitInputStream extends CountingInputStream
Limit total reads and skips to a specified maximum, then return EOF
- Since:
- 0.9.34
-
Field Summary
-
Constructor Summary
Constructors Constructor Description LimitInputStream(InputStream in, long max) -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
LimitInputStream
- Parameters:
max- max number of bytes to read
-
-
Method Details
-
available
- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classCountingInputStream- Throws:
IOException
-
read
- Overrides:
readin classCountingInputStream- Throws:
IOException
-
read
- Overrides:
readin classCountingInputStream- Throws:
IOException
-