public final class MimeAttachmentSet extends Object implements AttachmentSet
AttachmentSet backed by MimeMultipartParser| Constructor and Description |
|---|
MimeAttachmentSet(MimeMultipartParser mpp) |
| 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()
This is expensive operation, its going to to read all the underlying
attachments in
MimeMultipartParser. |
Iterator<Attachment> |
iterator()
Expensive operation.
|
public MimeAttachmentSet(MimeMultipartParser mpp)
@Nullable public Attachment get(String contentId)
AttachmentSetget in interface AttachmentSetcontentId - The content ID like "foo-bar-zot@abc.com", without
surrounding '<' and '>' used as the transfer syntax.public boolean isEmpty()
MimeMultipartParser.isEmpty in interface AttachmentSetpublic void add(Attachment att)
AttachmentSet
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.
add in interface AttachmentSetatt - must not be null.public Iterator<Attachment> iterator()
iterator in interface Iterable<Attachment>Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.