Class BoundedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.io.input.ProxyInputStream
org.apache.commons.io.input.BoundedInputStream
org.apache.commons.compress.utils.BoundedInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Deprecated.
A stream that limits reading from a wrapped stream to a given number of bytes.
- Since:
- 1.6
- This class is not thread-safe
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.io.input.BoundedInputStream
BoundedInputStream.Builder
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorDescriptionBoundedInputStream
(InputStream in, long size) Deprecated.Creates the stream that will at most read the given amount of bytes from the given stream. -
Method Summary
Modifier and TypeMethodDescriptionlong
Deprecated.Gets how many bytes remain to read.Methods inherited from class org.apache.commons.io.input.BoundedInputStream
afterRead, available, builder, close, getCount, getMaxCount, getMaxLength, getRemaining, isPropagateClose, mark, markSupported, onMaxLength, read, read, read, reset, setPropagateClose, skip, toString
Methods inherited from class org.apache.commons.io.input.ProxyInputStream
beforeRead, handleIOException, unwrap
-
Constructor Details
-
BoundedInputStream
Deprecated.Creates the stream that will at most read the given amount of bytes from the given stream.- Parameters:
in
- the stream to read fromsize
- the maximum amount of bytes to read
-
-
Method Details
-
getBytesRemaining
Deprecated.Gets how many bytes remain to read.- Returns:
- bytes how many bytes remain to read.
- Since:
- 1.21
-
BoundedInputStream
.