public abstract class BoundedArchiveInputStream extends java.io.InputStream
Constructor and Description |
---|
BoundedArchiveInputStream(long start,
long remaining)
Create a new bounded input stream.
|
Modifier and Type | Method and Description |
---|---|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
protected abstract int |
read(long pos,
java.nio.ByteBuffer buf)
Read content of the stream into a
ByteBuffer . |
public BoundedArchiveInputStream(long start, long remaining)
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.public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
protected abstract int read(long pos, java.nio.ByteBuffer buf) throws java.io.IOException
ByteBuffer
.pos
- position to start the read.buf
- buffer to add the read content.java.io.IOException
- if I/O fails.