Class FastInfosetDataContentHandler

java.lang.Object
com.sun.xml.messaging.saaj.soap.FastInfosetDataContentHandler
All Implemented Interfaces:
DataContentHandler

public class FastInfosetDataContentHandler extends Object implements DataContentHandler
JAF data handler for Fast Infoset content
Author:
Santiago Pericas-Geertsen
  • Field Details

  • Constructor Details

    • FastInfosetDataContentHandler

      public FastInfosetDataContentHandler()
  • Method Details

    • getTransferDataFlavors

      public ActivationDataFlavor[] getTransferDataFlavors()
      Return the DataFlavors for this DataContentHandler
      Specified by:
      getTransferDataFlavors in interface DataContentHandler
      Returns:
      The DataFlavors.
    • getTransferData

      public Object getTransferData(ActivationDataFlavor flavor, DataSource dataSource) throws IOException
      Return the Transfer Data of type DataFlavor from InputStream
      Specified by:
      getTransferData in interface DataContentHandler
      Parameters:
      flavor - The DataFlavor.
      dataSource - DataSource.
      Returns:
      The constructed Object.
      Throws:
      IOException - in case of an I/O error
    • getContent

      public Object getContent(DataSource dataSource) throws IOException
      Description copied from interface: DataContentHandler
      Return an object representing the data in its most preferred form. Generally this will be the form described by the first ActivationDataFlavor returned by the getTransferDataFlavors method.
      Specified by:
      getContent in interface DataContentHandler
      Parameters:
      dataSource - The DataSource representing the data to be converted.
      Returns:
      The constructed Object.
      Throws:
      IOException - if the data can't be accessed
    • writeTo

      public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException
      Construct an object from a byte stream (similar semantically to previous method, we are deciding which one to support)
      Specified by:
      writeTo in interface DataContentHandler
      Parameters:
      obj - The object to be converted.
      mimeType - The requested MIME type of the resulting byte stream.
      os - The output stream into which to write the converted byte stream.
      Throws:
      IOException - errors writing to the stream