Package org.apache.tika.sax
Class ToHTMLContentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.tika.sax.ToTextContentHandler
org.apache.tika.sax.ToXMLContentHandler
org.apache.tika.sax.ToHTMLContentHandler
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidendElement(String uri, String localName, String qName) voidWrites the XML prefix.Methods inherited from class org.apache.tika.sax.ToXMLContentHandler
characters, startElement, startPrefixMapping, write, writeMethods inherited from class org.apache.tika.sax.ToTextContentHandler
endDocument, ignorableWhitespace, toStringMethods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, unparsedEntityDecl, warning
-
Constructor Details
-
ToHTMLContentHandler
public ToHTMLContentHandler(OutputStream stream, String encoding) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
ToHTMLContentHandler
public ToHTMLContentHandler()
-
-
Method Details
-
startDocument
Description copied from class:ToXMLContentHandlerWrites the XML prefix.- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classToXMLContentHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classToXMLContentHandler- Throws:
SAXException
-