Package com.sun.xml.ws.message.saaj
Class SAAJMessage.SAAJAttachmentSet
- java.lang.Object
-
- com.sun.xml.ws.message.saaj.SAAJMessage.SAAJAttachmentSet
-
- All Implemented Interfaces:
AttachmentSet,Iterable<Attachment>
- Enclosing class:
- SAAJMessage
protected static class SAAJMessage.SAAJAttachmentSet extends Object implements AttachmentSet
AttachmentSetfor SAAJ. SAAJ wants '<' and '>' for the content ID, butAttachmentSetdoesn't. S this class also does the conversion between them.
-
-
Constructor Summary
Constructors Constructor Description SAAJAttachmentSet(jakarta.xml.soap.SOAPMessage sm)
-
Method Summary
All Methods Instance Methods Concrete 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.Iterator<Attachment>iterator()Returns an iterator over a set of elements of type T.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
get
public Attachment get(String contentId)
Gets the attachment by the content ID.- Specified by:
getin interfaceAttachmentSet- 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
public boolean isEmpty()
Description copied from interface:AttachmentSetReturns true if there's no attachment.- Specified by:
isEmptyin interfaceAttachmentSet
-
iterator
public Iterator<Attachment> iterator()
Returns an iterator over a set of elements of type T.- Specified by:
iteratorin interfaceIterable<Attachment>- Returns:
- an Iterator.
-
add
public void add(Attachment att)
Description copied from interface:AttachmentSetAdds 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.- Specified by:
addin interfaceAttachmentSet- Parameters:
att- must not be null.
-
-