Class StringDataContentHandler

java.lang.Object
com.sun.xml.messaging.saaj.soap.StringDataContentHandler
All Implemented Interfaces:
jakarta.activation.DataContentHandler

public class StringDataContentHandler extends Object implements jakarta.activation.DataContentHandler
JAF data content handler for text/plain --> String
  • Constructor Details

    • StringDataContentHandler

      public StringDataContentHandler()
  • Method Details

    • getDF

      protected jakarta.activation.ActivationDataFlavor getDF()
    • getTransferDataFlavors

      public jakarta.activation.ActivationDataFlavor[] getTransferDataFlavors()
      Return the DataFlavors for this DataContentHandler.
      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
      Return the Transfer Data of type DataFlavor from InputStream.
      Specified by:
      getTransferData in interface jakarta.activation.DataContentHandler
      Parameters:
      df - The DataFlavor
      ds - The DataSource corresponding to the data
      Returns:
      String object
      Throws:
      IOException
    • getContent

      public Object getContent(jakarta.activation.DataSource ds) throws IOException
      Specified by:
      getContent in interface jakarta.activation.DataContentHandler
      Throws:
      IOException
    • writeTo

      public void writeTo(Object obj, String type, OutputStream os) throws IOException
      Write the object to the output stream, using the specified MIME type.
      Specified by:
      writeTo in interface jakarta.activation.DataContentHandler
      Throws:
      IOException