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
-
Method Summary
Modifier and TypeMethodDescriptiongetContent
(jakarta.activation.DataSource ds) protected jakarta.activation.ActivationDataFlavor
getDF()
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
.void
writeTo
(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:
getTransferDataFlavors
in 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:
getTransferData
in interfacejakarta.activation.DataContentHandler
- Parameters:
df
- The DataFlavords
- The DataSource corresponding to the data- Returns:
- String object
- Throws:
IOException
-
getContent
- Specified by:
getContent
in interfacejakarta.activation.DataContentHandler
- Throws:
IOException
-
writeTo
Write the object to the output stream, using the specified MIME type.- Specified by:
writeTo
in interfacejakarta.activation.DataContentHandler
- Throws:
IOException
-