public class DataHandlerUtils extends Object
| Constructor and Description |
|---|
DataHandlerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static DataHandler |
toDataHandler(String name,
Object object,
org.mule.runtime.api.metadata.MediaType contentType)
Transforms an Object into a DataHandler of its corresponding type.
|
public static DataHandler toDataHandler(String name, Object object, org.mule.runtime.api.metadata.MediaType contentType) throws IOException
name - the name of the attachment being handledobject - the attachment to be handledcontentType - the Content-Type of the attachment that is being handledDataHandler of the corresponding attachmentIOException - if the transformation fails.Copyright © 2025. All rights reserved.