Class ConfigurableDataHandler

  • All Implemented Interfaces:
    Transferable

    public class ConfigurableDataHandler
    extends DataHandler
    This Axiom DataHandler inplementation allows the user to set custom values for the following MIME body part headers.
    • content-transfer-encoding
    • content-type

    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");

    See Also:
    DataHandler
    • Constructor Detail

      • ConfigurableDataHandler

        public ConfigurableDataHandler​(DataSource ds)
      • ConfigurableDataHandler

        public ConfigurableDataHandler​(Object data,
                                       String type)
      • ConfigurableDataHandler

        public ConfigurableDataHandler​(URL url)
    • Method Detail

      • setContentType

        public void setContentType​(String contentType)
      • getTransferEncoding

        public String getTransferEncoding()
      • setTransferEncoding

        public void setTransferEncoding​(String transferEncoding)