public interface RandomAccessRead extends SequentialRead
| Modifier and Type | Method and Description |
|---|---|
long |
getPosition()
Returns offset of next byte to be returned by a read method.
|
long |
length()
The total number of bytes that are available.
|
void |
seek(long position)
Seek to a position in the data.
|
close, read, readlong getPosition()
throws java.io.IOException
SequentialRead.read()
(if no more bytes are left it returns a value >= length of source)java.io.IOExceptionvoid seek(long position)
throws java.io.IOException
position - The position to seek to.java.io.IOException - If there is an error while seeking.long length()
throws java.io.IOException
java.io.IOException - If there is an IO error while determining the
length of the data stream.