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:
available
in classInputStream
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
public long skip(long amountToSkip) - Overrides:
skip
in classInputStream
-