Package org.apache.tika.example
Class MyFirstTika
java.lang.Object
org.apache.tika.example.MyFirstTika
Demonstrates how to call the different components within Tika: its
Detector framework (aka MIME identification and repository), its
Parser interface, its org.apache.tika.language.LanguageIdentifier and other goodies.
It also shows the "easy way" via AutoDetectParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic StringparseUsingAutoDetect(String filename, TikaConfig tikaConfig, Metadata metadata) static StringparseUsingComponents(String filename, TikaConfig tikaConfig, Metadata metadata)
-
Constructor Details
-
MyFirstTika
public MyFirstTika()
-
-
Method Details
-
main
- Throws:
Exception
-
parseUsingAutoDetect
public static String parseUsingAutoDetect(String filename, TikaConfig tikaConfig, Metadata metadata) throws Exception - Throws:
Exception
-
parseUsingComponents
public static String parseUsingComponents(String filename, TikaConfig tikaConfig, Metadata metadata) throws Exception - Throws:
Exception
-