Package org.apache.pdfbox.io
Class RandomAccessInputStream
java.lang.Object
java.io.InputStream
org.apache.pdfbox.io.RandomAccessInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
An InputStream which reads from a RandomAccessRead.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RandomAccessRead
private static final org.apache.commons.logging.Log
private long
-
Constructor Summary
ConstructorsConstructorDescriptionRandomAccessInputStream
(RandomAccessRead randomAccessRead) Creates a new RandomAccessInputStream, with a position of zero. -
Method Summary
Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG -
input
-
position
private long position
-
-
Constructor Details
-
RandomAccessInputStream
Creates a new RandomAccessInputStream, with a position of zero. The InputStream will maintain its own position independent of the RandomAccessRead.- Parameters:
randomAccessRead
- The RandomAccessRead to read from.
-
-
Method Details
-
restorePosition
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-