Interface AttachmentTextExtractor


  • @ExperimentalApi
    public interface AttachmentTextExtractor
    Extract text from an attachment.
    Since:
    6.5
    • 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().
        Parameters:
        attachment - attachment for extraction
        Returns:
        Optional describing a InputStreamSource of extracted text if succeeds otherwise Option.empty()