Package org.apache.tika.sax
Class EmbeddedContentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.tika.sax.ContentHandlerDecorator
org.apache.tika.sax.EmbeddedContentHandler
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
Content handler decorator that prevents the
startDocument()
and endDocument()
events from reaching the decorated handler.
This is useful when you want to direct the results of parsing multiple
different XML documents into a single target document without worrying
about the startDocument()
and endDocument()
methods
being called more than once.-
Constructor Summary
ConstructorDescriptionEmbeddedContentHandler
(ContentHandler handler) Created a decorator that prevents the given handler from receivingstartDocument()
andendDocument()
events. -
Method Summary
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
characters, endElement, endPrefixMapping, error, fatalError, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, 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
-
EmbeddedContentHandler
Created a decorator that prevents the given handler from receivingstartDocument()
andendDocument()
events.- Parameters:
handler
- the content handler to be decorated
-
-
Method Details
-
startDocument
public void startDocument()Ignored.- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classContentHandlerDecorator
-
endDocument
public void endDocument()Ignored.- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classContentHandlerDecorator
-