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
ConstructorDescriptionCreates a decorator for the given SAX event handler. -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
void
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
characters, endElement, endPrefixMapping, error, fatalError, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString, warning
Methods inherited from class org.xml.sax.helpers.DefaultHandler
notationDecl, resolveEntity, unparsedEntityDecl
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
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:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classContentHandlerDecorator
- Throws:
SAXException
-
reallyEndDocument
- Throws:
SAXException
-
isEndDocumentWasCalled
public boolean isEndDocumentWasCalled()
-