public class ContentHandlerExample extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
MAXIMUM_TEXT_CHUNK_SIZE |
| Constructor and Description |
|---|
ContentHandlerExample() |
| Modifier and Type | Method and Description |
|---|---|
String |
parseBodyToHTML()
Example of extracting just the body as HTML, without the
head part, as a string
|
String |
parseOnePartToHTML()
Example of extracting just one part of the document's body,
as HTML as a string, excluding the rest
|
String |
parseToHTML()
Example of extracting the contents as HTML, as a string.
|
String |
parseToPlainText()
Example of extracting the plain text of the contents.
|
List<String> |
parseToPlainTextChunks()
Example of extracting the plain text in chunks, with each chunk
of no more than a certain maximum size
|
protected final int MAXIMUM_TEXT_CHUNK_SIZE
public String parseToPlainText() throws IOException, SAXException, org.apache.tika.exception.TikaException
IOExceptionSAXExceptionorg.apache.tika.exception.TikaExceptionpublic String parseToHTML() throws IOException, SAXException, org.apache.tika.exception.TikaException
IOExceptionSAXExceptionorg.apache.tika.exception.TikaExceptionpublic String parseBodyToHTML() throws IOException, SAXException, org.apache.tika.exception.TikaException
IOExceptionSAXExceptionorg.apache.tika.exception.TikaExceptionpublic String parseOnePartToHTML() throws IOException, SAXException, org.apache.tika.exception.TikaException
IOExceptionSAXExceptionorg.apache.tika.exception.TikaExceptionpublic List<String> parseToPlainTextChunks() throws IOException, SAXException, org.apache.tika.exception.TikaException
IOExceptionSAXExceptionorg.apache.tika.exception.TikaExceptionCopyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.