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:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
public class EmbeddedContentHandler extends ContentHandlerDecorator
Content handler decorator that prevents thestartDocument()
andendDocument()
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 thestartDocument()
andendDocument()
methods being called more than once.
-
-
Constructor Summary
Constructors Constructor Description EmbeddedContentHandler(org.xml.sax.ContentHandler handler)
Created a decorator that prevents the given handler from receivingstartDocument()
andendDocument()
events.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endDocument()
Ignored.void
startDocument()
Ignored.-
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
characters, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startElement, startPrefixMapping, toString
-
-
-
-
Constructor Detail
-
EmbeddedContentHandler
public EmbeddedContentHandler(org.xml.sax.ContentHandler handler)
Created a decorator that prevents the given handler from receivingstartDocument()
andendDocument()
events.- Parameters:
handler
- the content handler to be decorated
-
-
Method Detail
-
startDocument
public void startDocument()
Ignored.- Specified by:
startDocument
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startDocument
in classContentHandlerDecorator
-
endDocument
public void endDocument()
Ignored.- Specified by:
endDocument
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endDocument
in classContentHandlerDecorator
-
-