Package org.apache.axiom.mime.activation
Class PartDataHandler
java.lang.Object
jakarta.activation.DataHandler
org.apache.axiom.mime.activation.PartDataHandler
DataHandler implementation for MIME parts read from a stream.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DataSourcecreateDataSource(Blob content, String contentType) Create theDataSourceto be returned bygetDataSource().final PartBlobgetBlob()Get thePartBlobthat wraps this instance.final DataSourcefinal PartgetPart()Get the MIME part linked to this data handler.final voidwriteTo(OutputStream os) Methods inherited from class jakarta.activation.DataHandler
getAllCommands, getBean, getCommand, getContent, getContentType, getInputStream, getName, getOutputStream, getPreferredCommands, getTransferData, getTransferDataFlavors, isDataFlavorSupported, setCommandMap, setDataContentHandlerFactory
-
Constructor Details
-
PartDataHandler
-
-
Method Details
-
getPart
Get the MIME part linked to this data handler.- Returns:
- the MIME part
-
getBlob
Get thePartBlobthat wraps this instance.- Returns:
- the blob wrapper
-
getDataSource
- Overrides:
getDataSourcein classDataHandler
-
createDataSource
Create theDataSourceto be returned bygetDataSource(). This method may be overridden by subclasses to support customDataSourceimplementations.- Parameters:
content- the content of the partcontentType- the content type expected to be returned byDataSource.getContentType(); defaults toapplication/octet-streamif the part doesn't specify a content type- Returns:
- the
DataSourceinstance, ornullto use the default implementation
-
writeTo
- Overrides:
writeToin classDataHandler- Throws:
IOException
-