Interface AttachmentTextExtractor
-
@ExperimentalApi public interface AttachmentTextExtractorExtract text from an attachment.- Since:
- 6.5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<InputStreamSource>extract(Attachment attachment)Extracts text from an attachment.List<String>getFileExtensions()Return list of file extensions that this extractor supports.List<String>getMimeTypes()Return list of mime types that this extractor supports.
-
-
-
Method Detail
-
getFileExtensions
List<String> getFileExtensions()
Return list of file extensions that this extractor supports.
-
extract
Optional<InputStreamSource> extract(Attachment attachment)
Extracts text from an attachment. This method can throw aRuntimeExceptionto indicate unrecoverable state of the attachment. In case of recoverable error, it shall returnsOption.empty().- Parameters:
attachment- attachment for extraction- Returns:
Optionaldescribing aInputStreamSourceof extracted text if succeeds otherwiseOption.empty()
-
-