Tika Text File ExtractionTo extract text file, Tika provides TXTParser class. This class is used to extract content and metadata from text file. It is located into org.apache.tika.parser.txt package. This class contains constructor and methods that are tabled below. Tika TextParser Constructor
Tika TextParser Methods
Tika Text File Extraction ExampleIn this example, we are extracting content and metadata from a text file. See the below example. //javatpoint.txt Our text file content. Welcome to the Javatpoint. Javatpoint is a Technical portal that contains latest computer science topics. Output: Document Content:Welcome to the Javatpoint. Javatpoint is a Technical portal that contains latest computer science topics. Document Metadata: Content-Encoding: ISO-8859-1 Content-Type: text/plain; charset=ISO-8859-1
Next Topic#
|