Package org.apache.tika.sax
Class EndDocumentShieldingContentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.tika.sax.ContentHandlerDecorator
org.apache.tika.sax.EndDocumentShieldingContentHandler
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
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 Summary
ConstructorsConstructorDescriptionCreates a decorator for the given SAX event handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanvoidMethods inherited from class org.apache.tika.sax.ContentHandlerDecorator
characters, endElement, endPrefixMapping, error, fatalError, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString, warningMethods inherited from class org.xml.sax.helpers.DefaultHandler
notationDecl, resolveEntity, unparsedEntityDecl
-
Constructor Details
-
EndDocumentShieldingContentHandler
Creates a decorator for the given SAX event handler.- Parameters:
handler- SAX event handler to be decorated
-
-
Method Details
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classContentHandlerDecorator- Throws:
SAXException
-
reallyEndDocument
- Throws:
SAXException
-
isEndDocumentWasCalled
public boolean isEndDocumentWasCalled()
-