Class DataHandlerDataSource

  • All Implemented Interfaces:
    DataSource

    class DataHandlerDataSource
    extends java.lang.Object
    implements DataSource
    The DataHanderDataSource class implements the DataSource interface when the DataHandler is constructed with an Object and a mimeType string.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getContentType()
      Returns the MIME type of the data represented by this object.
      java.io.InputStream getInputStream()
      Returns an InputStream representing this object.
      java.lang.String getName()
      Returns the name of this object.
      java.io.OutputStream getOutputStream()
      Returns the OutputStream for this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataHandlerDataSource

        public DataHandlerDataSource​(DataHandler dh)
        The constructor.
    • Method Detail

      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Returns an InputStream representing this object.
        Specified by:
        getInputStream in interface DataSource
        Returns:
        the InputStream
        Throws:
        java.io.IOException - for failures creating the InputStream
      • getOutputStream

        public java.io.OutputStream getOutputStream()
                                             throws java.io.IOException
        Returns the OutputStream for this object.
        Specified by:
        getOutputStream in interface DataSource
        Returns:
        the OutputStream
        Throws:
        java.io.IOException - for failures creating the OutputStream
      • getContentType

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

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