Interface AttachmentTextExtractor
- All Known Implementing Classes:
StubAttachmentTextExtractor
@ExperimentalApi
public interface AttachmentTextExtractor
Extract text from an attachment.
- Since:
- 6.5
-
Method Summary
Modifier and TypeMethodDescriptionextract(Attachment attachment) Extracts text from an attachment.Return list of file extensions that this extractor supports.Return list of mime types that this extractor supports.
-
Method Details
-
getFileExtensions
Return list of file extensions that this extractor supports. -
getMimeTypes
Return list of mime types that this extractor supports. -
extract
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()
-