org.apache.tika.sax
Class TextContentHandler

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

public class TextContentHandler
extends org.xml.sax.helpers.DefaultHandler

Content handler decorator that only passes the characters(char[], int, int) and (@link ignorableWhitespace(char[], int, int) (plus startDocument() and endDocument() events to the decorated content handler.


Constructor Summary
TextContentHandler(ContentHandler delegate)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void ignorableWhitespace(char[] ch, int start, int length)
           
 void startDocument()
           
 String toString()
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endElement, endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextContentHandler

public TextContentHandler(ContentHandler delegate)
Method Detail

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
Specified by:
ignorableWhitespace in interface ContentHandler
Overrides:
ignorableWhitespace in class org.xml.sax.helpers.DefaultHandler
Throws:
SAXException

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
SAXException

toString

public String toString()
Overrides:
toString in class Object


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