Class 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 Detail

      • AbstractDataContentHandler

        public AbstractDataContentHandler()
        Default Constructor
    • 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 interface javax.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
      • getTransferDataFlavors

        public DataFlavor[] getTransferDataFlavors()
        Specified by:
        getTransferDataFlavors in interface javax.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.