org.apache.pdfbox.io
Interface SequentialRead

All Known Subinterfaces:
RandomAccess, RandomAccessRead
All Known Implementing Classes:
RandomAccessBuffer, RandomAccessBufferedFileInputStream, RandomAccessFile

public interface SequentialRead

An interface allowing sequential read operations.


Method Summary
 void close()
          Release resources that are being held.
 int read()
          Read a single byte of data.
 int read(byte[] b, int offset, int length)
          Read a buffer of data.
 

Method Detail

close

void close()
           throws IOException
Release resources that are being held.

Throws:
IOException - If there is an error closing this resource.

read

int read()
         throws IOException
Read a single byte of data.

Returns:
The byte of data that is being read.
Throws:
IOException - If there is an error while reading the data.

read

int read(byte[] b,
         int offset,
         int length)
         throws IOException
Read a buffer of data.

Parameters:
b - The buffer to write the data to.
offset - Offset into the buffer to start writing.
length - The amount of data to attempt to read.
Returns:
The number of bytes that were actually read.
Throws:
IOException - If there was an error while reading the data.


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.