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 IOException
SequentialRead.read()
(if no more bytes are left it returns a value >= length of source)IOExceptionvoid seek(long position)
throws IOException
position - The position to seek to.IOException - If there is an error while seeking.long length()
throws IOException
IOException - If there is an IO error while determining the
length of the data stream.Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.