Package com.sun.xml.ws.api.message
Interface AttachmentSet
-
- All Superinterfaces:
Iterable<Attachment>
- All Known Implementing Classes:
AttachmentSetImpl,AttachmentSetImpl,MimeAttachmentSet,SAAJMessage.SAAJAttachmentSet
public interface AttachmentSet extends Iterable<Attachment>
A set ofAttachmenton aMessage.A particular attention is made to ensure that attachments can be read and parsed lazily as requested.
- See Also:
Message.getAttachments()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(Attachment att)Adds an attachment to this set.Attachmentget(String contentId)Gets the attachment by the content ID.booleanisEmpty()Returns true if there's no attachment.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
get
@Nullable Attachment get(String contentId)
Gets the attachment by the content ID.- Parameters:
contentId- The content ID like "foo-bar-zot@abc.com", 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
void add(Attachment att)
Adds an attachment to this set.Note that it's OK for an
Attachmentto belong to more than oneAttachmentSet(which is in fact necessary when you wrap aMessageinto another.- Parameters:
att- must not be null.
-
-