public static class MessagePartConverter.ContentAndAttachments extends Object
MessagePartConverter.getContent(Part) method.
One message can contain several body (content) with different content types.| Constructor and Description |
|---|
ContentAndAttachments() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(EmailAttachment attachment)
Adds attachment to the corresponding list.
|
void |
addContent(String contentType,
String data)
Adds content to list of contents.
|
List<ContentMessage> |
getContentByType(String contentType)
Returns the content by the content type.
|
boolean |
isEmpty()
Returns true if all the lists are empty.
|
String |
toString() |
public void addContent(String contentType, String data)
contentType - a value of Content-Type header for this contentdata - a content as stringpublic void addAttachment(EmailAttachment attachment)
attachment - instance of the EmailAttachment classpublic List<ContentMessage> getContentByType(String contentType)
contentType - the type of the contentpublic boolean isEmpty()
Copyright © 2023. All rights reserved.