java.lang.Object
jakarta.activation.DataSourceDataContentHandler
- All Implemented Interfaces:
DataContentHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DataContentHandlerprivate DataSourceprivate ActivationDataFlavor[] -
Constructor Summary
ConstructorsConstructorDescriptionThe constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetContent(DataSource ds) Return an object representing the data in its most preferred form.Return the Transfer Data of type ActivationDataFlavor from InputStream.Return the ActivationDataFlavors for thisDataContentHandler.voidwriteTo(Object obj, String mimeType, OutputStream os) Write the object to the output stream.
-
Field Details
-
ds
-
transferFlavors
-
dch
-
-
Constructor Details
-
DataSourceDataContentHandler
The constructor.
-
-
Method Details
-
getTransferDataFlavors
Return the ActivationDataFlavors for thisDataContentHandler.- Specified by:
getTransferDataFlavorsin interfaceDataContentHandler- Returns:
- the ActivationDataFlavors
-
getTransferData
Return the Transfer Data of type ActivationDataFlavor from InputStream.- Specified by:
getTransferDatain interfaceDataContentHandler- Parameters:
df- the ActivationDataFlavords- the DataSource- Returns:
- the constructed Object
- Throws:
IOException- if the handler doesn't support the requested flavorIOException- if the data can't be accessed
-
getContent
Description copied from interface:DataContentHandlerReturn an object representing the data in its most preferred form. Generally this will be the form described by the first ActivationDataFlavor returned by thegetTransferDataFlavorsmethod.- Specified by:
getContentin interfaceDataContentHandler- Parameters:
ds- The DataSource representing the data to be converted.- Returns:
- The constructed Object.
- Throws:
IOException- if the data can't be accessed
-
writeTo
Write the object to the output stream.- Specified by:
writeToin interfaceDataContentHandler- Parameters:
obj- The object to be converted.mimeType- The requested MIME type of the resulting byte stream.os- The output stream into which to write the converted byte stream.- Throws:
IOException- errors writing to the stream
-