Class PDFObjectStreamParser


  • public class PDFObjectStreamParser
    extends BaseParser
    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
    • Constructor Detail

      • PDFObjectStreamParser

        public PDFObjectStreamParser​(COSStream strm,
                                     COSDocument doc,
                                     boolean forceParsing)
                              throws java.io.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:
        java.io.IOException - If there is an error initializing the stream.
        Since:
        Apache PDFBox 1.3.0
      • PDFObjectStreamParser

        public PDFObjectStreamParser​(COSStream strm,
                                     COSDocument doc)
                              throws java.io.IOException
        Constructor.
        Parameters:
        strm - The stream to parse.
        doc - The document for the current parsing.
        Throws:
        java.io.IOException - If there is an error initializing the stream.
    • Method Detail

      • parse

        public void parse()
                   throws java.io.IOException
        This will parse the tokens in the stream. This will close the stream when it is finished parsing.
        Throws:
        java.io.IOException - If there is an error while parsing the stream.
      • getObjects

        public java.util.List<COSObject> getObjects()
        This will get the objects that were parsed from the stream.
        Returns:
        All of the objects in the stream.