- java.lang.Object
-
- com.sun.mail.handlers.handler_base
-
- All Implemented Interfaces:
javax.activation.DataContentHandler
- Direct Known Subclasses:
image_gif
,message_rfc822
,multipart_mixed
,text_plain
public abstract class handler_base extends java.lang.Object implements javax.activation.DataContentHandler
Base class for other DataContentHandlers.
-
-
Constructor Summary
Constructors Constructor Description handler_base()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
getData(javax.activation.ActivationDataFlavor aFlavor, javax.activation.DataSource ds)
Given the flavor that matched, return the appropriate type of object.protected abstract javax.activation.ActivationDataFlavor[]
getDataFlavors()
Return an array of ActivationDataFlavors that we support.java.lang.Object
getTransferData(java.awt.datatransfer.DataFlavor df, javax.activation.DataSource ds)
Return the Transfer Data of type DataFlavor from InputStream.java.awt.datatransfer.DataFlavor[]
getTransferDataFlavors()
Return the DataFlavors for thisDataContentHandler
.
-
-
-
Method Detail
-
getDataFlavors
protected abstract javax.activation.ActivationDataFlavor[] getDataFlavors()
Return an array of ActivationDataFlavors that we support. Usually there will be only one.- Returns:
- array of ActivationDataFlavors that we support
-
getData
protected java.lang.Object getData(javax.activation.ActivationDataFlavor aFlavor, javax.activation.DataSource ds) throws java.io.IOException
Given the flavor that matched, return the appropriate type of object. Usually there's only one flavor so just call getContent.- Parameters:
aFlavor
- the ActivationDataFlavords
- DataSource containing the data- Returns:
- the object
- Throws:
java.io.IOException
- for errors reading the data
-
getTransferDataFlavors
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Return the DataFlavors for thisDataContentHandler
.- Specified by:
getTransferDataFlavors
in interfacejavax.activation.DataContentHandler
- Returns:
- The DataFlavors
-
getTransferData
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor df, javax.activation.DataSource ds) throws java.io.IOException
Return the Transfer Data of type DataFlavor from InputStream.- Specified by:
getTransferData
in interfacejavax.activation.DataContentHandler
- Parameters:
df
- The DataFlavords
- The DataSource corresponding to the data- Returns:
- the object
- Throws:
java.io.IOException
- for errors reading the data
-
-