Class DataHandlerDataSource

  • All Implemented Interfaces:
    jakarta.activation.DataSource

    public class DataHandlerDataSource
    extends Object
    implements jakarta.activation.DataSource
    DataSource impl using a DataHandler
    Author:
    Jitendra Kotamraju
    • Constructor Detail

      • DataHandlerDataSource

        public DataHandlerDataSource​(jakarta.activation.DataHandler dh)
    • Method Detail

      • getInputStream

        public InputStream getInputStream()
                                   throws IOException
        Returns an InputStream representing this object.
        Specified by:
        getInputStream in interface jakarta.activation.DataSource
        Returns:
        the InputStream
        Throws:
        IOException
      • getOutputStream

        public OutputStream getOutputStream()
                                     throws IOException
        Returns the OutputStream for this object.
        Specified by:
        getOutputStream in interface jakarta.activation.DataSource
        Returns:
        the OutputStream
        Throws:
        IOException
      • getContentType

        public String getContentType()
        Returns the MIME type of the data represented by this object.
        Specified by:
        getContentType in interface jakarta.activation.DataSource
        Returns:
        the MIME type
      • getName

        public String getName()
        Returns the name of this object.
        Specified by:
        getName in interface jakarta.activation.DataSource
        Returns:
        the name of this object