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.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
private int read(int len) throws java.io.IOException
java.io.IOException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream