public interface AttachmentSet extends Iterable<Attachment>
Attachment
on a Message
.
A particular attention is made to ensure that attachments can be read and parsed lazily as requested.
Message.getAttachments()
Modifier and Type | Method and Description |
---|---|
void |
add(Attachment att)
Adds an attachment to this set.
|
Attachment |
get(String contentId)
Gets the attachment by the content ID.
|
boolean |
isEmpty()
Returns true if there's no attachment.
|
forEach, iterator, spliterator
@Nullable Attachment get(String contentId)
contentId
- The content ID like "foo-bar-zot@abc.com", without
surrounding '<' and '>' used as the transfer syntax.boolean isEmpty()
void add(Attachment att)
Note that it's OK for an Attachment
to belong to
more than one AttachmentSet
(which is in fact
necessary when you wrap a Message
into another.
att
- must not be null.Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.