Class ZipFile.BoundedFileChannelInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.commons.compress.utils.BoundedArchiveInputStream
-
- org.apache.commons.compress.archivers.zip.ZipFile.BoundedFileChannelInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- ZipFile
private class ZipFile.BoundedFileChannelInputStream extends BoundedArchiveInputStream
Lock-free implementation of BoundedInputStream. The implementation uses positioned reads on the underlying archive file channel and therefore performs significantly faster in concurrent environment.
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.channels.FileChannelarchive
-
Constructor Summary
Constructors Constructor Description BoundedFileChannelInputStream(long start, long remaining)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intread(long pos, java.nio.ByteBuffer buf)Read content of the stream into aByteBuffer.-
Methods inherited from class org.apache.commons.compress.utils.BoundedArchiveInputStream
read, read
-
-
-
-
Method Detail
-
read
protected int read(long pos, java.nio.ByteBuffer buf) throws java.io.IOExceptionDescription copied from class:BoundedArchiveInputStreamRead content of the stream into aByteBuffer.- Specified by:
readin classBoundedArchiveInputStream- Parameters:
pos- position to start the read.buf- buffer to add the read content.- Returns:
- number of read bytes.
- Throws:
java.io.IOException- if I/O fails.
-
-