public class PDFStreamParser extends BaseParser
DEF, document, ENDOBJ, ENDSTREAM, forceParsing, pdfSource, PROP_PUSHBACK_SIZE
Constructor | Description |
---|---|
PDFStreamParser(java.io.InputStream stream,
RandomAccess raf) |
Constructor that takes a stream to parse.
|
PDFStreamParser(java.io.InputStream stream,
RandomAccess raf,
boolean forceParsing) |
Constructor that takes a stream to parse.
|
PDFStreamParser(COSStream stream) |
Constructor.
|
PDFStreamParser(COSStream stream,
boolean forceParsing) |
Constructor.
|
PDFStreamParser(PDStream stream) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
clearResources() |
Release all used resources.
|
void |
close() |
This will close the underlying pdfSource object.
|
java.util.Iterator<java.lang.Object> |
getTokenIterator() |
This will get an iterator which can be used to parse the stream
one token after the other.
|
java.util.List<java.lang.Object> |
getTokens() |
This will get the tokens that were parsed from the stream.
|
void |
parse() |
This will parse the tokens in the stream.
|
protected java.lang.String |
readOperator() |
This will read an operator from the stream.
|
isClosing, isClosing, isEndOfName, isEOL, isEOL, isWhitespace, isWhitespace, parseBoolean, parseCOSArray, parseCOSDictionary, parseCOSName, parseCOSStream, parseCOSString, parseCOSString, parseDirObject, readExpectedString, readGenerationNumber, readInt, readLine, readLong, readObjectNumber, readString, readString, readStringNumber, readUntilEndStream, setDocument, skipSpaces
public PDFStreamParser(java.io.InputStream stream, RandomAccess raf, boolean forceParsing) throws java.io.IOException
stream
- The stream to read data from.raf
- The random access file.forceParsing
- flag to skip malformed or otherwise unparseable
input where possiblejava.io.IOException
- If there is an error reading from the stream.public PDFStreamParser(java.io.InputStream stream, RandomAccess raf) throws java.io.IOException
stream
- The stream to read data from.raf
- The random access file.java.io.IOException
- If there is an error reading from the stream.public PDFStreamParser(PDStream stream) throws java.io.IOException
stream
- The stream to parse.java.io.IOException
- If there is an error initializing the stream.public PDFStreamParser(COSStream stream, boolean forceParsing) throws java.io.IOException
stream
- The stream to parse.forceParsing
- flag to skip malformed or otherwise unparseable
input where possiblejava.io.IOException
- If there is an error initializing the stream.public PDFStreamParser(COSStream stream) throws java.io.IOException
stream
- The stream to parse.java.io.IOException
- If there is an error initializing the stream.public void parse() throws java.io.IOException
java.io.IOException
- If there is an error while parsing the stream.public java.util.List<java.lang.Object> getTokens()
public void close() throws java.io.IOException
java.io.IOException
- If there is an error releasing resources.public java.util.Iterator<java.lang.Object> getTokenIterator()
protected java.lang.String readOperator() throws java.io.IOException
java.io.IOException
- If there is an error reading from the stream.public void clearResources()
clearResources
in class BaseParser