Package org.apache.axiom.attachments
Class ConfigurableDataHandler
java.lang.Object
jakarta.activation.DataHandler
org.apache.axiom.attachments.ConfigurableDataHandler
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContentTransferEncodingPolicy
ContentTransferEncodingPolicy
implementation that recognizes blobs created fromConfigurableDataHandler
objects and returns the content transfer encoding set usingsetTransferEncoding(String)
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setContentType
(String contentType) void
setTransferEncoding
(String transferEncoding) Methods inherited from class jakarta.activation.DataHandler
getAllCommands, getBean, getCommand, getContent, getDataSource, getInputStream, getName, getOutputStream, getPreferredCommands, getTransferData, getTransferDataFlavors, isDataFlavorSupported, setCommandMap, setDataContentHandlerFactory, writeTo
-
Field Details
-
CONTENT_TRANSFER_ENCODING_POLICY
ContentTransferEncodingPolicy
implementation that recognizes blobs created fromConfigurableDataHandler
objects and returns the content transfer encoding set usingsetTransferEncoding(String)
.
-
-
Constructor Details
-
ConfigurableDataHandler
-
ConfigurableDataHandler
-
ConfigurableDataHandler
-
-
Method Details
-
getContentType
- Overrides:
getContentType
in classDataHandler
-
setContentType
-
getTransferEncoding
-
setTransferEncoding
-