Class LimitedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
io.protostuff.LimitedInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
An InputStream implementations which reads from some other InputStream but is limited to a particular number of
bytes.
-
Field Summary
FieldsFields inherited from class FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class FilterInputStream
close, mark, markSupported, read, resetMethods inherited from class InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
limit
private int limit
-
-
Constructor Details
-
LimitedInputStream
-
LimitedInputStream
-
-
Method Details
-
limit
-
available
- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-