org.apache.pdfbox.io
Interface RandomAccessRead

All Superinterfaces:
SequentialRead
All Known Subinterfaces:
RandomAccess
All Known Implementing Classes:
RandomAccessBuffer, RandomAccessBufferedFileInputStream, RandomAccessFile

public interface RandomAccessRead
extends SequentialRead

An interface allowing random access read operations.


Method Summary
 long length()
          The total number of bytes that are available.
 void seek(long position)
          Seek to a position in the data.
 
Methods inherited from interface org.apache.pdfbox.io.SequentialRead
close, read, read
 

Method Detail

seek

void seek(long position)
          throws IOException
Seek to a position in the data.

Parameters:
position - The position to seek to.
Throws:
IOException - If there is an error while seeking.

length

long length()
            throws IOException
The total number of bytes that are available.

Returns:
The number of bytes available.
Throws:
IOException - If there is an IO error while determining the length of the data stream.