Class EndDocumentShieldingContentHandler

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    public class EndDocumentShieldingContentHandler
    extends ContentHandlerDecorator
    A wrapper around a ContentHandler which will ignore normal SAX calls to endDocument(), and only fire them later. This is typically used to ensure that we can output the metadata before ending the document
    • Constructor Detail

      • EndDocumentShieldingContentHandler

        public EndDocumentShieldingContentHandler​(org.xml.sax.ContentHandler handler)
        Creates a decorator for the given SAX event handler.
        Parameters:
        handler - SAX event handler to be decorated
    • Method Detail

      • endDocument

        public void endDocument()
                         throws org.xml.sax.SAXException
        Specified by:
        endDocument in interface org.xml.sax.ContentHandler
        Overrides:
        endDocument in class ContentHandlerDecorator
        Throws:
        org.xml.sax.SAXException
      • reallyEndDocument

        public void reallyEndDocument()
                               throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • getEndDocumentWasCalled

        public boolean getEndDocumentWasCalled()