Package org.mule.soapkit.soap.util
Class DataHandlerUtils
java.lang.Object
org.mule.soapkit.soap.util.DataHandlerUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javax.activation.DataHandlertoDataHandler(String name, Object object, org.mule.runtime.api.metadata.MediaType contentType) Transforms an Object into a DataHandler of its corresponding type.
-
Constructor Details
-
DataHandlerUtils
public DataHandlerUtils()
-
-
Method Details
-
toDataHandler
public static javax.activation.DataHandler toDataHandler(String name, Object object, org.mule.runtime.api.metadata.MediaType contentType) throws IOException Transforms an Object into a DataHandler of its corresponding type.- Parameters:
name- the name of the attachment being handledobject- the attachment to be handledcontentType- the Content-Type of the attachment that is being handled- Returns:
- a
DataHandlerof the corresponding attachment - Throws:
IOException- if the transformation fails.
-