Class ZipArchiveInputStream.BoundCountInputStream
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.archivers.zip.ZipArchiveInputStream.BoundCountInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
ZipArchiveInputStream
private final class ZipArchiveInputStream.BoundCountInputStream
extends org.apache.commons.io.input.BoundedInputStream
Input stream adapted from commons-io.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.io.input.BoundedInputStream
org.apache.commons.io.input.BoundedInputStream.Builder
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorsConstructorDescriptionBoundCountInputStream
(InputStream in, long max) Creates a newBoundedInputStream
that wraps the given input stream and limits it to a certain size. -
Method Summary
Methods inherited from class org.apache.commons.io.input.BoundedInputStream
afterRead, available, builder, close, getCount, getMaxCount, getMaxLength, getRemaining, isPropagateClose, mark, markSupported, onMaxLength, read, reset, setPropagateClose, skip, toString
Methods inherited from class org.apache.commons.io.input.ProxyInputStream
beforeRead, handleIOException, unwrap
-
Constructor Details
-
BoundCountInputStream
BoundCountInputStream(InputStream in, long max) Creates a newBoundedInputStream
that wraps the given input stream and limits it to a certain size.- Parameters:
in
- The wrapped input streammax
- The maximum number of bytes to return
-
-
Method Details
-
atMaxLength
private boolean atMaxLength() -
read
- Overrides:
read
in classorg.apache.commons.io.input.BoundedInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classorg.apache.commons.io.input.BoundedInputStream
- Throws:
IOException
-
readCount
private int readCount(int bytesRead)
-