接口 MimeContainer


  • public interface MimeContainer
    Represents a container for MIME attachments Concrete implementations might adapt a SOAPMessage or an email message.
    从以下版本开始:
    3.0
    作者:
    Arjen Poutsma
    另请参阅:
    XML-binary Optimized Packaging
    • 方法详细资料

      • convertToXopPackage

        boolean convertToXopPackage()
        Turn this message into a XOP package.
        返回:
        true when the message actually is a XOP package
        另请参阅:
        XOP Packages
      • addAttachment

        void addAttachment​(String contentId,
                           DataHandler dataHandler)
        Add the given data handler as an attachment to this container.
        参数:
        contentId - the content id of the attachment
        dataHandler - the data handler containing the data of the attachment
      • getAttachment

        DataHandler getAttachment​(String contentId)
        Return the attachment with the given content id, or null if not found.
        参数:
        contentId - the content id
        返回:
        the attachment, as a data handler