- All Superinterfaces:
Iterable<Attachment>
- All Known Implementing Classes:
AttachmentSetImpl
,MimeAttachmentSet
,SAAJMessage.SAAJAttachmentSet
A set of
Attachment
on a Message
.
A particular attention is made to ensure that attachments can be read and parsed lazily as requested.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Attachment att) Adds an attachment to this set.Gets the attachment by the content ID.boolean
isEmpty()
Returns true if there's no attachment.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
get
Gets the attachment by the content ID.- Parameters:
contentId
- The content ID like "[email protected]", without surrounding '<' and '>' used as the transfer syntax.- Returns:
- null if no such attachment exist.
-
isEmpty
boolean isEmpty()Returns true if there's no attachment. -
add
Adds an attachment to this set.Note that it's OK for an
Attachment
to belong to more than oneAttachmentSet
(which is in fact necessary when you wrap aMessage
into another.- Parameters:
att
- must not be null.
-