Apache Tika API Usage Examples

This page provides a number of examples on how to use the various Tika APIs. All of the examples shown are also available in the Tika Example module in SVN.

TODO Complete

Parsing

TODO Explain this better

Parsing using the Tika Facade

public String parseToStringExample() throws IOException, SAXException, TikaException {
    InputStream stream = ParsingExample.class.getResourceAsStream("test.doc");
    Tika tika = new Tika();
    try {
        return tika.parseToString(stream);
    } finally {
        stream.close();
    }
}