org.apache.tika.sax
Class ToHTMLContentHandler

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

public class ToHTMLContentHandler
extends ToXMLContentHandler

SAX event handler that serializes the HTML document to a character stream. The incoming SAX events are expected to be well-formed (properly nested, etc.) and valid HTML.

Since:
Apache Tika 0.10

Field Summary
 
Fields inherited from class org.apache.tika.sax.ToXMLContentHandler
inStartElement, namespaces
 
Constructor Summary
ToHTMLContentHandler()
           
ToHTMLContentHandler(OutputStream stream, String encoding)
           
 
Method Summary
 void endElement(String uri, String localName, String qName)
           
 void startDocument()
          Writes the XML prefix.
 
Methods inherited from class org.apache.tika.sax.ToXMLContentHandler
characters, startElement, startPrefixMapping, write, write
 
Methods inherited from class org.apache.tika.sax.ToTextContentHandler
endDocument, ignorableWhitespace, toString
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToHTMLContentHandler

public ToHTMLContentHandler(OutputStream stream,
                            String encoding)
                     throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

ToHTMLContentHandler

public ToHTMLContentHandler()
Method Detail

startDocument

public void startDocument()
                   throws SAXException
Description copied from class: ToXMLContentHandler
Writes the XML prefix.

Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class ToXMLContentHandler
Throws:
SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class ToXMLContentHandler
Throws:
SAXException


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