Class BoundedSeekableByteChannelInputStream

  • All Implemented Interfaces:
    Closeable, 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 Detail

      • BoundedSeekableByteChannelInputStream

        public BoundedSeekableByteChannelInputStream​(long start,
                                                     long remaining,
                                                     SeekableByteChannel channel)
        Create a bounded stream on the underlying SeekableByteChannel
        Parameters:
        start - Position in the stream from where the reading of this bounded stream starts
        remaining - Amount of bytes which are allowed to read from the bounded stream
        channel - Channel which the reads will be delegated to