Package org.apache.pdfbox.io
Class RandomAccessFileInputStream
java.lang.Object
java.io.InputStream
org.apache.pdfbox.io.RandomAccessFileInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
This class allows a section of a RandomAccessFile to be accessed as an
input stream.
- Version:
- $Revision: 1.5 $
- Author:
- Ben Litchfield
-
Constructor Summary
ConstructorsConstructorDescriptionRandomAccessFileInputStream(RandomAccess raFile, long startPosition, long length) Constructor. -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Constructor Details
-
RandomAccessFileInputStream
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()- Overrides:
availablein classInputStream
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
public long skip(long amountToSkip) - Overrides:
skipin classInputStream
-