Class TikaParser

  • All Implemented Interfaces:
    IFileParser

    public class TikaParser
    extends java.lang.Object
    implements IFileParser
    Implementation for IFileParser to deal with Parser for most content-types.
    Since:
    5.5.0
    Version:
    $Revision$ $Date$
    • Constructor Summary

      Constructors 
      Constructor Description
      TikaParser()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String extract​(java.io.File inputFile)  
      java.lang.String extract​(java.io.File inputFile, java.nio.charset.Charset charset)  
      java.lang.String extract​(java.io.InputStream inputStream)
      Extract text from an input stream.
      java.lang.String extract​(java.io.InputStream inputStream, java.nio.charset.Charset charset)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TikaParser

        public TikaParser()
    • Method Detail

      • extract

        public java.lang.String extract​(java.io.File inputFile,
                                        java.nio.charset.Charset charset)
                                 throws ParseException,
                                        java.io.FileNotFoundException
        Specified by:
        extract in interface IFileParser
        Throws:
        ParseException
        java.io.FileNotFoundException
      • extract

        public java.lang.String extract​(java.io.InputStream inputStream)
                                 throws ParseException,
                                        java.io.IOException
        Description copied from interface: IFileParser
        Extract text from an input stream.
        Specified by:
        extract in interface IFileParser
        Parameters:
        inputStream - the input stream.
        Returns:
        the text extracted.
        Throws:
        ParseException - if an error occurred while parsing stream content.
        java.io.IOException - if an I/O error occurred.