Package io.jmix.imap.impl
Class ImapAttachmentsImpl
java.lang.Object
io.jmix.imap.impl.ImapAttachmentsImpl
- All Implemented Interfaces:
- ImapAttachments
@Component("imap_ImapAttachments")
public class ImapAttachmentsImpl
extends Object
implements ImapAttachments
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected ImapDataProviderprotected ImapHelperprotected Metadataprotected TimeSource
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected ImapMessageAttachmentcreateImapMessageAttachment(int i, jakarta.mail.BodyPart bodyPart) protected StringdecodeAttachmentName(String encodedName) Sometimes email clients encode filenames according to the RFC6266 standard.fetchAttachments(ImapMessage message) Retrieve and cache attachments for messagebyte[]loadFile(ImapMessageAttachment attachment) Load a file message attachment content into byte array.protected Collection<ImapMessageAttachment>makeAttachments(org.eclipse.angus.mail.imap.IMAPMessage msg) openStream(ImapMessageAttachment attachment) Return an input stream to load a message attachment content
- 
Field Details- 
imapHelper
- 
imapDataProvider
- 
timeSource
- 
metadata
 
- 
- 
Constructor Details- 
ImapAttachmentsImplpublic ImapAttachmentsImpl()
 
- 
- 
Method Details- 
fetchAttachmentsDescription copied from interface:ImapAttachmentsRetrieve and cache attachments for message- Specified by:
- fetchAttachmentsin interface- ImapAttachments
- Parameters:
- message- reference object for IMAP message
- Returns:
- reference objects for message attachments
 
- 
makeAttachmentsprotected Collection<ImapMessageAttachment> makeAttachments(org.eclipse.angus.mail.imap.IMAPMessage msg) throws jakarta.mail.MessagingException - Throws:
- jakarta.mail.MessagingException
 
- 
decodeAttachmentNameSometimes email clients encode filenames according to the RFC6266 standard. This method resolve this problem- Parameters:
- encodedName- encoded attachment name
- Returns:
- name of attachment
 
- 
createImapMessageAttachmentprotected ImapMessageAttachment createImapMessageAttachment(int i, jakarta.mail.BodyPart bodyPart) throws jakarta.mail.MessagingException - Throws:
- jakarta.mail.MessagingException
 
- 
openStreamDescription copied from interface:ImapAttachmentsReturn an input stream to load a message attachment content- Specified by:
- openStreamin interface- ImapAttachments
- Parameters:
- attachment- IMAP message attachment reference object
- Returns:
- input stream, must be closed after use
 
- 
loadFileDescription copied from interface:ImapAttachmentsLoad a file message attachment content into byte array.- Specified by:
- loadFilein interface- ImapAttachments
- Parameters:
- attachment- IMAP message attachment reference object
- Returns:
- attachment content
 
 
-