Package org.eclipse.angus.mail.handlers
Class handler_base
java.lang.Object
org.eclipse.angus.mail.handlers.handler_base
- All Implemented Interfaces:
DataContentHandler
- Direct Known Subclasses:
image_gif,message_rfc822,multipart_mixed,text_plain
Base class for other DataContentHandlers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectgetData(ActivationDataFlavor aFlavor, DataSource ds) Given the flavor that matched, return the appropriate type of object.protected abstract ActivationDataFlavor[]Return an array of ActivationDataFlavors that we support.Return the Transfer Data of type ActivationDataFlavor from InputStream.Return the ActivationDataFlavors for thisDataContentHandler.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.activation.DataContentHandler
getContent, writeTo
-
Constructor Details
-
handler_base
public handler_base()Creates a defaulthandler_base.
-
-
Method Details
-
getDataFlavors
Return an array of ActivationDataFlavors that we support. Usually there will be only one.- Returns:
- array of ActivationDataFlavors that we support
-
getData
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:
IOException- for errors reading the data
-
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 corresponding to the data- Returns:
- the object
- Throws:
IOException- for errors reading the data
-