Package org.apache.rat.analysis
Class TikaProcessor
java.lang.Object
org.apache.rat.analysis.TikaProcessor
A wrapping around the Tika processor.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Document.TypefromMediaType(org.apache.tika.mime.MediaType mediaType)Gets the Document.Type based on the MediaType.static InputStreammarkSupportedInputStream(InputStream stream)Ensures that the input stream supportsmark.static StringProcess the input document.
-
Method Details
-
markSupportedInputStream
Ensures that the input stream supportsmark.- Parameters:
stream- the stream to test.- Returns:
- a stream that supports
mark.
-
process
Process the input document.- Parameters:
document- the Document to process.- Returns:
- the mimetype as a string.
- Throws:
RatDocumentAnalysisException- on error.
-
fromMediaType
Gets the Document.Type based on the MediaType.- Parameters:
mediaType- the media type to check.- Returns:
- The document type.
-