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
Limit total reads and skips to a specified maximum, then return EOF
- Since:
- 0.9.34
-
Field Summary
Fields inherited from class i2p.susi.util.CountingInputStream
count
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
-
Method Summary
Methods inherited from class i2p.susi.util.CountingInputStream
getRead
Methods inherited from class java.io.FilterInputStream
close, mark, markSupported, read, reset
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
-