public class EndDocumentShieldingContentHandler extends ContentHandlerDecorator
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 documentConstructor and Description |
---|
EndDocumentShieldingContentHandler(ContentHandler handler)
Creates a decorator for the given SAX event handler.
|
Modifier and Type | Method and Description |
---|---|
void |
endDocument() |
boolean |
getEndDocumentWasCalled() |
void |
reallyEndDocument() |
characters, endElement, endPrefixMapping, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning
public EndDocumentShieldingContentHandler(ContentHandler handler)
handler
- SAX event handler to be decoratedpublic void endDocument() throws SAXException
endDocument
in interface ContentHandler
endDocument
in class ContentHandlerDecorator
SAXException
public void reallyEndDocument() throws SAXException
SAXException
public boolean getEndDocumentWasCalled()
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.