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
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
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator |
characters, endElement, endPrefixMapping, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning |
EndDocumentShieldingContentHandler
public EndDocumentShieldingContentHandler(ContentHandler handler)
- Creates a decorator for the given SAX event handler.
- Parameters:
handler
- SAX event handler to be decorated
endDocument
public void endDocument()
throws SAXException
- Specified by:
endDocument
in interface ContentHandler
- Overrides:
endDocument
in class ContentHandlerDecorator
- Throws:
SAXException
reallyEndDocument
public void reallyEndDocument()
throws SAXException
- Throws:
SAXException
getEndDocumentWasCalled
public boolean getEndDocumentWasCalled()
Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.