public abstract class BoundedArchiveInputStream extends 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,
ByteBuffer buf)
Read content of the stream into a
ByteBuffer. |
available, close, mark, markSupported, read, reset, skippublic 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 IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionprotected abstract int read(long pos,
ByteBuffer buf)
throws IOException
ByteBuffer.pos - position to start the read.buf - buffer to add the read content.IOException - if I/O fails.Copyright © 2002–2025. All rights reserved.