Top Description Constructors Methods
com.sun.mail.handlers

public abstract Class handler_base

extends Object
implements DataContentHandler
Class Inheritance
All Implemented Interfaces
javax.activation.DataContentHandler
Known Direct Subclasses
com.sun.mail.handlers.image_gif, com.sun.mail.handlers.message_rfc822, com.sun.mail.handlers.multipart_mixed, com.sun.mail.handlers.text_plain
Imports
java.io.IOException, java.awt.datatransfer.DataFlavor, javax.activation.*

Base class for other DataContentHandlers.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Object

Returns:

the object
getData
(ActivationDataFlavor
the ActivationDataFlavor
aFlavor
,
DataSource
DataSource containing the data
ds
)

Given the flavor that matched, return the appropriate type of object.

protected abstract ActivationDataFlavor[]

Returns:

array of ActivationDataFlavors that we support
getDataFlavors
()

Return an array of ActivationDataFlavors that we support.

public Object

Returns:

the object
getTransferData
(DataFlavor
The DataFlavor
df
,
DataSource
The DataSource corresponding to the data
ds
)

Implements javax.activation.DataContentHandler.getTransferData.

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

Returns:

The DataFlavors
getTransferDataFlavors
()

Implements javax.activation.DataContentHandler.getTransferDataFlavors.

Return the DataFlavors for this DataContentHandler.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

handler_baseback to summary
public handler_base()

Method Detail

getDataback to summary
protected Object getData(ActivationDataFlavor aFlavor, DataSource ds) throws IOException

Given the flavor that matched, return the appropriate type of object. Usually there's only one flavor so just call getContent.

Parameters
aFlavor:ActivationDataFlavor

the ActivationDataFlavor

ds:DataSource

DataSource containing the data

Returns:Object

the object

Exceptions
IOException:
for errors reading the data
getDataFlavorsback to summary
protected abstract ActivationDataFlavor[] getDataFlavors()

Return an array of ActivationDataFlavors that we support. Usually there will be only one.

Returns:ActivationDataFlavor[]

array of ActivationDataFlavors that we support

getTransferDataback to summary
public Object getTransferData(DataFlavor df, DataSource ds) throws IOException

Implements javax.activation.DataContentHandler.getTransferData.

Return the Transfer Data of type DataFlavor from InputStream.

Parameters
df:DataFlavor

The DataFlavor

ds:DataSource

The DataSource corresponding to the data

Returns:Object

the object

Annotations
@Override
Exceptions
IOException:
for errors reading the data
getTransferDataFlavorsback to summary
public DataFlavor[] getTransferDataFlavors()

Implements javax.activation.DataContentHandler.getTransferDataFlavors.

Return the DataFlavors for this DataContentHandler.

Returns:DataFlavor[]

The DataFlavors

Annotations
@Override