public class ConfigurableDataHandler
extends javax.activation.DataHandler
Data written to the MIME part gets encoded by content-transfer-encoding specified as above
Usage is Similar to the javax.activation.DataHandler except for the setting of the above properties.
eg:
dataHandler = new ConfigurableDataHandler(new ByteArrayDataSource(byteArray));
dataHandler.setTransferEncoding("quoted-printable");
dataHandler.setContentType("image/jpg");
DataHandler
Constructor and Description |
---|
ConfigurableDataHandler(javax.activation.DataSource arg0) |
ConfigurableDataHandler(Object arg0,
String arg1) |
ConfigurableDataHandler(URL arg0) |
Modifier and Type | Method and Description |
---|---|
String |
getContentType() |
String |
getTransferEncoding() |
void |
setContentType(String contentType) |
void |
setTransferEncoding(String transferEncoding) |
getAllCommands, getBean, getCommand, getContent, getDataSource, getInputStream, getName, getOutputStream, getPreferredCommands, getTransferData, getTransferDataFlavors, isDataFlavorSupported, setCommandMap, setDataContentHandlerFactory, writeTo
public ConfigurableDataHandler(javax.activation.DataSource arg0)
public ConfigurableDataHandler(URL arg0)
public String getContentType()
getContentType
in class javax.activation.DataHandler
public void setContentType(String contentType)
public String getTransferEncoding()
public void setTransferEncoding(String transferEncoding)
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.