Package io.jmix.imap

Interface ImapAttachments

All Known Implementing Classes:
ImapAttachmentsImpl

public interface ImapAttachments
Provide operations to load IMAP message attachments
  • Method Details

    • fetchAttachments

      Collection<ImapMessageAttachment> fetchAttachments(ImapMessage message)
      Retrieve and cache attachments for message
      Parameters:
      message - reference object for IMAP message
      Returns:
      reference objects for message attachments
    • openStream

      InputStream openStream(ImapMessageAttachment attachment)
      Return an input stream to load a message attachment content
      Parameters:
      attachment - IMAP message attachment reference object
      Returns:
      input stream, must be closed after use
    • loadFile

      byte[] loadFile(ImapMessageAttachment attachment)
      Load a file message attachment content into byte array.
      Parameters:
      attachment - IMAP message attachment reference object
      Returns:
      attachment content