| java.io.PushbackInputStream org.pdfbox.io.PushBackInputStream
All known Subclasses: org.pdfbox.io.ByteArrayPushBackInputStream,
Constructor Summary | |
public | PushBackInputStream(InputStream input, int size) Constructor.
Parameters: input - The input stream. Parameters: size - The size of the push back buffer. throws: IOException - If there is an error with the stream. |
Method Summary | |
public void | fillBuffer() This is a method used to fix PDFBox issue 974661, the PDF parsing code needs
to know if there is at least x amount of data left in the stream, but the available()
method returns how much data will be available without blocking. | public boolean | isEOF() A simple test to see if we are at the end of the stream. | public int | peek() This will peek at the next byte. |
PushBackInputStream | public PushBackInputStream(InputStream input, int size) throws IOException(Code) | | Constructor.
Parameters: input - The input stream. Parameters: size - The size of the push back buffer. throws: IOException - If there is an error with the stream. |
fillBuffer | public void fillBuffer() throws IOException(Code) | | This is a method used to fix PDFBox issue 974661, the PDF parsing code needs
to know if there is at least x amount of data left in the stream, but the available()
method returns how much data will be available without blocking. PDFBox is willing to
block to read the data, so we will first fill the internal buffer.
throws: IOException - If there is an error filling the buffer. |
isEOF | public boolean isEOF() throws IOException(Code) | | A simple test to see if we are at the end of the stream.
true if we are at the end of the stream. throws: IOException - If there is an error reading the next byte. |
peek | public int peek() throws IOException(Code) | | This will peek at the next byte.
The next byte on the stream, leaving it as available to read. throws: IOException - If there is an error reading the next byte. |
|
|