Class ImageDataContentHandler

java.lang.Object
java.awt.Component
com.sun.xml.messaging.saaj.soap.ImageDataContentHandler
All Implemented Interfaces:
jakarta.activation.DataContentHandler, ImageObserver, MenuContainer, Serializable

public class ImageDataContentHandler extends Component implements jakarta.activation.DataContentHandler
See Also:
  • Constructor Details

    • ImageDataContentHandler

      public ImageDataContentHandler()
  • Method Details

    • getTransferDataFlavors

      public jakarta.activation.ActivationDataFlavor[] getTransferDataFlavors()
      Returns an array of DataFlavor objects indicating the flavors the data can be provided in. The array should be ordered according to preference for providing the data (from most richly descriptive to least descriptive).
      Specified by:
      getTransferDataFlavors in interface jakarta.activation.DataContentHandler
      Returns:
      The DataFlavors.
    • getTransferData

      public Object getTransferData(jakarta.activation.ActivationDataFlavor df, jakarta.activation.DataSource ds) throws IOException
      Returns an object which represents the data to be transferred. The class of the object returned is defined by the representation class of the flavor.
      Specified by:
      getTransferData in interface jakarta.activation.DataContentHandler
      Parameters:
      df - The DataFlavor representing the requested type.
      ds - The DataSource representing the data to be converted.
      Returns:
      The constructed Object.
      Throws:
      IOException
    • getContent

      public Object getContent(jakarta.activation.DataSource ds) throws IOException
      Return an object representing the data in its most preferred form. Generally this will be the form described by the first DataFlavor returned by the getTransferDataFlavors method.
      Specified by:
      getContent in interface jakarta.activation.DataContentHandler
      Parameters:
      ds - The DataSource representing the data to be converted.
      Returns:
      The constructed Object.
      Throws:
      IOException
    • writeTo

      public void writeTo(Object obj, String type, OutputStream os) throws IOException
      Convert the object to a byte stream of the specified MIME type and write it to the output stream.
      Specified by:
      writeTo in interface jakarta.activation.DataContentHandler
      Parameters:
      obj - The object to be converted.
      type - The requested MIME type of the resulting byte stream.
      os - The output stream into which to write the converted byte stream.
      Throws:
      IOException