Class TikaProcessor

java.lang.Object
org.apache.rat.analysis.TikaProcessor

public final class TikaProcessor extends Object
A wrapping around the Tika processor.
  • Method Details

    • markSupportedInputStream

      public static InputStream markSupportedInputStream(InputStream stream)
      Ensures that the input stream supports mark.
      Parameters:
      stream - the stream to test.
      Returns:
      a stream that supports mark.
    • process

      public static String process(Document document) throws RatDocumentAnalysisException
      Process the input document.
      Parameters:
      document - the Document to process.
      Returns:
      the mimetype as a string.
      Throws:
      RatDocumentAnalysisException - on error.
    • fromMediaType

      public static Document.Type fromMediaType(org.apache.tika.mime.MediaType mediaType)
      Gets the Document.Type based on the MediaType.
      Parameters:
      mediaType - the media type to check.
      Returns:
      The document type.