Class SAAJMessage.SAAJAttachmentSet

    • Constructor Detail

      • SAAJAttachmentSet

        public SAAJAttachmentSet​(jakarta.xml.soap.SOAPMessage sm)
    • Method Detail

      • get

        public Attachment get​(String contentId)
        Gets the attachment by the content ID.
        Specified by:
        get in interface AttachmentSet
        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 interface AttachmentSet
      • add

        public void add​(Attachment att)
        Description copied from interface: AttachmentSet
        Adds an attachment to this set.

        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.

        Specified by:
        add in interface AttachmentSet
        Parameters:
        att - must not be null.