Package org.apache.pdfbox.pdfparser
Class PDFObjectStreamParser
java.lang.Object
org.apache.pdfbox.pdfparser.BaseParser
org.apache.pdfbox.pdfparser.PDFObjectStreamParser
This will parse a PDF 1.5 object stream and extract all of the objects from the stream.
- Version:
- $Revision: 1.6 $
- Author:
- Ben Litchfield
-
Field Summary
Fields inherited from class org.apache.pdfbox.pdfparser.BaseParser
DEF, document, ENDOBJ, ENDSTREAM, forceParsing, pdfSource, PROP_PUSHBACK_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionPDFObjectStreamParser
(COSStream strm, COSDocument doc) Constructor.PDFObjectStreamParser
(COSStream strm, COSDocument doc, boolean forceParsing) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionThis will get the objects that were parsed from the stream.void
parse()
This will parse the tokens in the stream.Methods inherited from class org.apache.pdfbox.pdfparser.BaseParser
clearResources, 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
-
Constructor Details
-
PDFObjectStreamParser
public PDFObjectStreamParser(COSStream strm, COSDocument doc, boolean forceParsing) throws IOException Constructor.- Parameters:
strm
- The stream to parse.doc
- The document for the current parsing.forceParsing
- flag to skip malformed or otherwise unparseable input where possible- Throws:
IOException
- If there is an error initializing the stream.- Since:
- Apache PDFBox 1.3.0
-
PDFObjectStreamParser
Constructor.- Parameters:
strm
- The stream to parse.doc
- The document for the current parsing.- Throws:
IOException
- If there is an error initializing the stream.
-
-
Method Details
-
parse
This will parse the tokens in the stream. This will close the stream when it is finished parsing.- Throws:
IOException
- If there is an error while parsing the stream.
-
getObjects
This will get the objects that were parsed from the stream.- Returns:
- All of the objects in the stream.
-