public class RandomAccessInputStream
extends java.io.InputStream
Modifier and Type | Field and Description |
---|---|
private RandomAccessRead |
input |
private static org.apache.commons.logging.Log |
LOG |
private long |
position |
Constructor and Description |
---|
RandomAccessInputStream(RandomAccessRead randomAccessRead)
Creates a new RandomAccessInputStream, with a position of zero.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
(package private) void |
restorePosition() |
long |
skip(long n) |
private static final org.apache.commons.logging.Log LOG
private final RandomAccessRead input
private long position
public RandomAccessInputStream(RandomAccessRead randomAccessRead)
randomAccessRead
- The RandomAccessRead to read from.void restorePosition() throws java.io.IOException
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
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
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException