Top Fields Constructors Methods
jakarta.activation

pack-priv Class DataSourceDataContentHandler

Located in compilation unit of jakarta.activation.DataHandler.

extends Object
implements DataContentHandler
Class Inheritance
All Implemented Interfaces
jakarta.activation.DataContentHandler

Field Summary

Modifier and TypeField and Description
private DataContentHandler
private DataSource
private ActivationDataFlavor[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
getContent(DataSource
The DataSource representing the data to be converted.
ds
)

Implements jakarta.activation.DataContentHandler.getContent.

Return an object representing the data in its most preferred form.
public Object

Returns:

the constructed Object
getTransferData
(ActivationDataFlavor
the ActivationDataFlavor
df
,
DataSource
the DataSource
ds
)

Implements jakarta.activation.DataContentHandler.getTransferData.

Return the Transfer Data of type ActivationDataFlavor from InputStream.
public ActivationDataFlavor[]

Returns:

the ActivationDataFlavors
getTransferDataFlavors
()

Implements jakarta.activation.DataContentHandler.getTransferDataFlavors.

Return the ActivationDataFlavors for this DataContentHandler.
public void
writeTo(Object
The object to be converted.
obj
,
String
The requested MIME type of the resulting byte stream.
mimeType
,
OutputStream
The output stream into which to write the converted byte stream.
os
)

Implements jakarta.activation.DataContentHandler.writeTo.

Write the object to the output stream.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dchback to summary
private DataContentHandler dch
dsback to summary
private DataSource ds
transferFlavorsback to summary
private ActivationDataFlavor[] transferFlavors

Constructor Detail

DataSourceDataContentHandlerback to summary
public DataSourceDataContentHandler(DataContentHandler dch, DataSource ds)

The constructor.

Method Detail

getContentback to summary
public Object getContent(DataSource ds) throws IOException

Implements jakarta.activation.DataContentHandler.getContent.

Doc from jakarta.activation.DataContentHandler.getContent.

Return an object representing the data in its most preferred form. Generally this will be the form described by the first ActivationDataFlavor returned by the getTransferDataFlavors method.

Parameters
ds:DataSource

The DataSource representing the data to be converted.

Returns:Object

The constructed Object.

Exceptions
IOException:
if the data can't be accessed
getTransferDataback to summary
public Object getTransferData(ActivationDataFlavor df, DataSource ds) throws IOException

Implements jakarta.activation.DataContentHandler.getTransferData.

Return the Transfer Data of type ActivationDataFlavor from InputStream.

Parameters
df:ActivationDataFlavor

the ActivationDataFlavor

ds:DataSource

the DataSource

Returns:Object

the constructed Object

Exceptions
IOException:

Doc from jakarta.activation.DataContentHandler.getTransferData.

  • if the handler doesn't support the requested flavor
  • if the data can't be accessed
getTransferDataFlavorsback to summary
public ActivationDataFlavor[] getTransferDataFlavors()

Implements jakarta.activation.DataContentHandler.getTransferDataFlavors.

Return the ActivationDataFlavors for this DataContentHandler.

Returns:ActivationDataFlavor[]

the ActivationDataFlavors

writeToback to summary
public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException

Implements jakarta.activation.DataContentHandler.writeTo.

Write the object to the output stream.

Parameters
obj:Object

Doc from jakarta.activation.DataContentHandler.writeTo.

The object to be converted.

mimeType:String

Doc from jakarta.activation.DataContentHandler.writeTo.

The requested MIME type of the resulting byte stream.

os:OutputStream

Doc from jakarta.activation.DataContentHandler.writeTo.

The output stream into which to write the converted byte stream.

Exceptions
IOException:

Doc from jakarta.activation.DataContentHandler.writeTo.

errors writing to the stream