Module kala.compress.archivers.zip
Package kala.compress.archivers.zip
Class ZipArchiveInputStream.BoundCountInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
kala.compress.archivers.zip.ZipArchiveInputStream.BoundCountInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
ZipArchiveInputStream
Bounded input stream adapted from commons-io
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe max length to provideprivate longThe number of bytes already returnedFields inherited from class java.io.FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionBoundCountInputStream(InputStream in, long size) Creates a newBoundedInputStreamthat wraps the given input stream and limits it to a certain size. -
Method Summary
Methods inherited from class java.io.FilterInputStream
close, mark, markSupported, read, resetMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
max
private final long maxThe max length to provide -
pos
private long posThe number of bytes already returned
-
-
Constructor Details
-
BoundCountInputStream
BoundCountInputStream(InputStream in, long size) Creates a newBoundedInputStreamthat wraps the given input stream and limits it to a certain size.- Parameters:
in- The wrapped input streamsize- The maximum number of bytes to return
-
-
Method Details
-
available
- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-