Package org.apache.mailet.base.mail
Class AbstractDataContentHandler
- java.lang.Object
-
- org.apache.mailet.base.mail.AbstractDataContentHandler
-
- All Implemented Interfaces:
javax.activation.DataContentHandler
- Direct Known Subclasses:
message_disposition_notification
,multipart_report
public abstract class AbstractDataContentHandler extends Object implements javax.activation.DataContentHandler
Abstract class providing common Data Handler behavior.
-
-
Constructor Summary
Constructors Constructor Description AbstractDataContentHandler()
Default Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Object
computeContent(javax.activation.DataSource aDataSource)
Compute the content from aDataSource.protected abstract javax.activation.ActivationDataFlavor
computeDataFlavor()
Compute an ActivationDataFlavor.Object
getContent(javax.activation.DataSource aDataSource)
protected javax.activation.ActivationDataFlavor
getDataFlavor()
Get the DataFlavor, lazily initialised if required.Object
getTransferData(DataFlavor aDataFlavor, javax.activation.DataSource aDataSource)
DataFlavor[]
getTransferDataFlavors()
protected void
setDataFlavor(javax.activation.ActivationDataFlavor aDataFlavor)
protected void
updateDataFlavor()
Update the current DataFlavor.
-
-
-
Method Detail
-
updateDataFlavor
protected void updateDataFlavor()
Update the current DataFlavor.
-
computeDataFlavor
protected abstract javax.activation.ActivationDataFlavor computeDataFlavor()
Compute an ActivationDataFlavor.- Returns:
- A new ActivationDataFlavor
-
setDataFlavor
protected void setDataFlavor(javax.activation.ActivationDataFlavor aDataFlavor)
-
getContent
public Object getContent(javax.activation.DataSource aDataSource) throws IOException
- Specified by:
getContent
in interfacejavax.activation.DataContentHandler
- Throws:
IOException
- See Also:
DataContentHandler.getContent(javax.activation.DataSource)
-
computeContent
protected abstract Object computeContent(javax.activation.DataSource aDataSource) throws javax.mail.MessagingException
Compute the content from aDataSource.- Parameters:
aDataSource
-- Returns:
- new Content built from the DataSource
- Throws:
javax.mail.MessagingException
-
getTransferData
public Object getTransferData(DataFlavor aDataFlavor, javax.activation.DataSource aDataSource) throws UnsupportedFlavorException, IOException
- Specified by:
getTransferData
in interfacejavax.activation.DataContentHandler
- Throws:
UnsupportedFlavorException
IOException
- See Also:
DataContentHandler.getTransferData(java.awt.datatransfer.DataFlavor, javax.activation.DataSource)
-
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
- Specified by:
getTransferDataFlavors
in interfacejavax.activation.DataContentHandler
- See Also:
DataContentHandler.getTransferDataFlavors()
-
getDataFlavor
protected javax.activation.ActivationDataFlavor getDataFlavor()
Get the DataFlavor, lazily initialised if required.- Returns:
- Returns the dataFlavor, lazily initialised.
-
-