| org.pdfbox.io.RandomAccess
All known Subclasses: org.pdfbox.io.RandomAccessFile, org.pdfbox.io.RandomAccessBuffer,
RandomAccess | public interface RandomAccess (Code) | | An interface to allow PDF files to be stored completely in memory or
to use a scratch file on the disk.
author: Ben Litchfield version: $Revision: 1.2 $ |
Method Summary | |
public void | close() Release resources that are being held. | public long | length() The total number of bytes that are available. | public int | read() Read a single byte of data. | public int | read(byte[] b, int offset, int length) Read a buffer of data.
Parameters: b - The buffer to write the data to. Parameters: offset - Offset into the buffer to start writing. Parameters: length - The amount of data to attempt to read. | public void | seek(long position) Seek to a position in the data. | public void | write(int b) Write a byte to the stream. | public void | write(byte[] b, int offset, int length) Write a buffer of data to the stream. |
close | public void close() throws IOException(Code) | | Release resources that are being held.
throws: IOException - If there is an error closing this resource. |
length | public long length() throws IOException(Code) | | The total number of bytes that are available.
The number of bytes available. throws: IOException - If there is an IO error while determining the length of the data stream. |
read | public int read() throws IOException(Code) | | Read a single byte of data.
The byte of data that is being read. throws: IOException - If there is an error while reading the data. |
read | public int read(byte[] b, int offset, int length) throws IOException(Code) | | Read a buffer of data.
Parameters: b - The buffer to write the data to. Parameters: offset - Offset into the buffer to start writing. Parameters: length - The amount of data to attempt to read. The number of bytes that were actually read. throws: IOException - If there was an error while reading the data. |
seek | public void seek(long position) throws IOException(Code) | | Seek to a position in the data.
Parameters: position - The position to seek to. throws: IOException - If there is an error while seeking. |
write | public void write(int b) throws IOException(Code) | | Write a byte to the stream.
Parameters: b - The byte to write. throws: IOException - If there is an IO error while writing. |
write | public void write(byte[] b, int offset, int length) throws IOException(Code) | | Write a buffer of data to the stream.
Parameters: b - The buffer to get the data from. Parameters: offset - An offset into the buffer to get the data from. Parameters: length - The length of data to write. throws: IOException - If there is an error while writing the data. |
|
|