Module com.sun.xml.messaging.saaj
Package com.sun.xml.messaging.saaj.soap
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetContent(jakarta.activation.DataSource ds) protected jakarta.activation.ActivationDataFlavorgetDF()getTransferData(jakarta.activation.ActivationDataFlavor df, jakarta.activation.DataSource ds) Return the Transfer Data of type DataFlavor from InputStream.jakarta.activation.ActivationDataFlavor[]Return the DataFlavors for thisDataContentHandler.voidwriteTo(Object obj, String type, OutputStream os) Write the object to the output stream, using the specified MIME type.
-
Constructor Details
-
StringDataContentHandler
public StringDataContentHandler()
-
-
Method Details
-
getDF
protected jakarta.activation.ActivationDataFlavor getDF() -
getTransferDataFlavors
public jakarta.activation.ActivationDataFlavor[] getTransferDataFlavors()Return the DataFlavors for thisDataContentHandler.- Specified by:
getTransferDataFlavorsin interfacejakarta.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:
getTransferDatain interfacejakarta.activation.DataContentHandler- Parameters:
df- The DataFlavords- The DataSource corresponding to the data- Returns:
- String object
- Throws:
IOException
-
getContent
- Specified by:
getContentin interfacejakarta.activation.DataContentHandler- Throws:
IOException
-
writeTo
Write the object to the output stream, using the specified MIME type.- Specified by:
writeToin interfacejakarta.activation.DataContentHandler- Throws:
IOException
-