public class BoundedSeekableByteChannelInputStream extends BoundedArchiveInputStream
Constructor and Description |
---|
BoundedSeekableByteChannelInputStream(long start,
long remaining,
SeekableByteChannel channel)
Create a bounded stream on the underlying
SeekableByteChannel |
Modifier and Type | Method and Description |
---|---|
protected int |
read(long pos,
ByteBuffer buf)
Read content of the stream into a
ByteBuffer . |
read, read
available, close, mark, markSupported, read, reset, skip
public BoundedSeekableByteChannelInputStream(long start, long remaining, SeekableByteChannel channel)
SeekableByteChannel
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 toprotected int read(long pos, ByteBuffer buf) throws IOException
BoundedArchiveInputStream
ByteBuffer
.read
in class BoundedArchiveInputStream
pos
- position to start the read.buf
- buffer to add the read content.IOException
- if I/O fails.Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.