Class AttachmentUtils


  • public class AttachmentUtils
    extends Object
    A suite of utilities used for handling MTOM attachment data.
    • Constructor Detail

      • AttachmentUtils

        public AttachmentUtils()
    • Method Detail

      • makeBinaryOMNode

        public static OMText makeBinaryOMNode​(OMElement xop,
                                              DataHandler dh)
        Given an
        element, create an OMText element with the appropriate attachment data.
        Parameters:
        xop -
        data -
        Returns:
      • makeXopElement

        public static OMElement makeXopElement​(OMText data)
        Given an OMText node, create it's corresponding
        element.
      • findCachedAttachment

        public static void findCachedAttachment​(Attachments attachments)
        Process attachment's dataHandlers for CachedFileDataSource. If exist, execute file.deleteOnExit() request on the cached attachment file referenced by each CachedFileDataSource. This will delete the cached attachment file on JVM exit.
        Parameters:
        attachments -