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:
available
in classFilterInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classCountingInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classCountingInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classCountingInputStream
- Throws:
IOException
-