class BoundedSeekableByteChannelInputStream
extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
private java.nio.ByteBuffer |
buffer |
private long |
bytesRemaining |
private java.nio.channels.SeekableByteChannel |
channel |
private static int |
MAX_BUF_LEN |
| Constructor and Description |
|---|
BoundedSeekableByteChannelInputStream(java.nio.channels.SeekableByteChannel channel,
long size) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
private int |
read(int len) |
private static final int MAX_BUF_LEN
private final java.nio.ByteBuffer buffer
private final java.nio.channels.SeekableByteChannel channel
private long bytesRemaining
public BoundedSeekableByteChannelInputStream(java.nio.channels.SeekableByteChannel channel,
long size)
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionprivate int read(int len)
throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStream