Class DataHandlerDataSource

java.lang.Object
javax.activation.DataHandlerDataSource
All Implemented Interfaces:
DataSource

class DataHandlerDataSource extends Object implements DataSource
The DataHanderDataSource class implements the DataSource interface when the DataHandler is constructed with an Object and a mimeType string.
  • Field Details

  • Constructor Details

    • DataHandlerDataSource

      public DataHandlerDataSource(DataHandler dh)
      The constructor.
  • Method Details

    • getInputStream

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

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

      public 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 String getName()
      Returns the name of this object.
      Specified by:
      getName in interface DataSource
      Returns:
      the name of this object