org.apache.tika.sax
Class EmbeddedContentHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.tika.sax.ContentHandlerDecorator
          extended by org.apache.tika.sax.EmbeddedContentHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class EmbeddedContentHandler
extends ContentHandlerDecorator

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
EmbeddedContentHandler(ContentHandler handler)
          Created a decorator that prevents the given handler from receiving startDocument() and endDocument() events.
 
Method Summary
 void endDocument()
          Ignored.
 void startDocument()
          Ignored.
 
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
characters, endElement, endPrefixMapping, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startElement, startPrefixMapping, toString
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmbeddedContentHandler

public EmbeddedContentHandler(ContentHandler handler)
Created a decorator that prevents the given handler from receiving startDocument() and endDocument() events.

Parameters:
handler - the content handler to be decorated
Method Detail

startDocument

public void startDocument()
Ignored.

Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class ContentHandlerDecorator

endDocument

public void endDocument()
Ignored.

Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class ContentHandlerDecorator


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.