java.lang.Object
com.sun.xml.ws.message.saaj.SAAJMessage.SAAJAttachmentSet
- All Implemented Interfaces:
AttachmentSet
,Iterable<Attachment>
- Enclosing class:
- SAAJMessage
AttachmentSet
for SAAJ.
SAAJ wants '<' and '>' for the content ID, but
AttachmentSet
doesn't. S this class also does the conversion
between them.-
Constructor Summary
Constructors -
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.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
-
Constructor Details
-
SAAJAttachmentSet
public SAAJAttachmentSet(jakarta.xml.soap.SOAPMessage sm)
-
-
Method Details
-
get
Gets the attachment by the content ID.- Specified by:
get
in interfaceAttachmentSet
- Parameters:
contentId
- The content ID like "[email protected]", without surrounding '<' and '>' used as the transfer syntax.- Returns:
- null if no such attachment exist.
-
isEmpty
public boolean isEmpty()Description copied from interface:AttachmentSet
Returns true if there's no attachment.- Specified by:
isEmpty
in interfaceAttachmentSet
-
iterator
Returns an iterator over a set of elements of type T.- Specified by:
iterator
in interfaceIterable<Attachment>
- Returns:
- an Iterator.
-
add
Description copied from interface:AttachmentSet
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.- Specified by:
add
in interfaceAttachmentSet
- Parameters:
att
- must not be null.
-