Interface AttachmentTextExtractor

  • @ExperimentalApi
    public interface AttachmentTextExtractor
    Extract text from an attachment.
    • Method Detail

      • getFileExtensions

        List<String> getFileExtensions()
        Return list of file extensions that this extractor supports.
      • getMimeTypes

        List<String> getMimeTypes()
        Return list of mime types that this extractor supports.
      • extract

        Optional<InputStreamSource> extract​(Attachment attachment)
        Extracts text from an attachment. This method can throw a RuntimeException to indicate unrecoverable state of the attachment. In case of recoverable error, it shall returns Option.empty().
        attachment - attachment for extraction
        Optional describing a InputStreamSource of extracted text if succeeds otherwise Option.empty()