Class BoundedSeekableByteChannelInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.commons.compress.utils.BoundedArchiveInputStream
-
- org.apache.commons.compress.utils.BoundedSeekableByteChannelInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class BoundedSeekableByteChannelInputStream extends BoundedArchiveInputStream
InputStream that delegates requests to the underlying SeekableByteChannel, making sure that only bytes from a certain range can be read.- Since:
- 1.21
-
-
Constructor Summary
Constructors Constructor Description BoundedSeekableByteChannelInputStream(long start, long remaining, java.nio.channels.SeekableByteChannel channel)
Create a bounded stream on the underlyingSeekableByteChannel
-
Method Summary
-
Methods inherited from class org.apache.commons.compress.utils.BoundedArchiveInputStream
read, read
-
-
-
-
Constructor Detail
-
BoundedSeekableByteChannelInputStream
public BoundedSeekableByteChannelInputStream(long start, long remaining, java.nio.channels.SeekableByteChannel channel)
Create a bounded stream on the underlyingSeekableByteChannel
- Parameters:
start
- Position in the stream from where the reading of this bounded stream startsremaining
- Amount of bytes which are allowed to read from the bounded streamchannel
- Channel which the reads will be delegated to
-
-