Package org.apache.pdfbox.io
Interface RandomAccessRead
- All Superinterfaces:
SequentialRead
- All Known Subinterfaces:
RandomAccess
- All Known Implementing Classes:
RandomAccessBuffer
,RandomAccessBufferedFileInputStream
,RandomAccessFile
An interface allowing random access read operations.
-
Method Summary
Methods inherited from interface org.apache.pdfbox.io.SequentialRead
close, read, read
-
Method Details
-
getPosition
Returns offset of next byte to be returned by a read method.- Returns:
- offset of next byte which will be returned with next
SequentialRead.read()
(if no more bytes are left it returns a value >= length of source) - Throws:
IOException
-
seek
Seek to a position in the data.- Parameters:
position
- The position to seek to.- Throws:
IOException
- If there is an error while seeking.
-
length
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.
-