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:
org.xml.sax.ContentHandler,org.xml.sax.DTDHandler,org.xml.sax.EntityResolver,org.xml.sax.ErrorHandler
public class EndDocumentShieldingContentHandler extends ContentHandlerDecorator
A wrapper around aContentHandlerwhich will ignore normal SAX calls toendDocument(), and only fire them later. This is typically used to ensure that we can output the metadata before ending the document
-
-
Constructor Summary
Constructors Constructor Description EndDocumentShieldingContentHandler(org.xml.sax.ContentHandler handler)Creates a decorator for the given SAX event handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendDocument()booleangetEndDocumentWasCalled()voidreallyEndDocument()-
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
characters, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString
-
-
-
-
Method Detail
-
endDocument
public void endDocument() throws org.xml.sax.SAXException- Specified by:
endDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
endDocumentin classContentHandlerDecorator- Throws:
org.xml.sax.SAXException
-
reallyEndDocument
public void reallyEndDocument() throws org.xml.sax.SAXException- Throws:
org.xml.sax.SAXException
-
getEndDocumentWasCalled
public boolean getEndDocumentWasCalled()
-
-