org.pdfbox.io

Class RandomAccessFileInputStream


public class RandomAccessFileInputStream
extends InputStream

This class allows a section of a RandomAccessFile to be accessed as an input stream.
Version:
$Revision: 1.5 $
Author:
Ben Litchfield

Constructor Summary

RandomAccessFileInputStream(RandomAccess raFile, long startPosition, long length)
Constructor.

Method Summary

int
available()
void
close()
int
read()
int
read(byte[] b, int offset, int length)
long
skip(long amountToSkip)

Constructor Details

RandomAccessFileInputStream

public RandomAccessFileInputStream(RandomAccess raFile,
                                   long startPosition,
                                   long length)
Constructor.
Parameters:
raFile - The file to read the data from.
startPosition - The position in the file that this stream starts.
length - The length of the input stream.

Method Details

available

public int available()

close

public void close()

read

public int read()
            throws IOException

read

public int read(byte[] b,
                int offset,
                int length)
            throws IOException

skip

public long skip(long amountToSkip)