Package com.sun.xml.ws.encoding
Class StringDataContentHandler
java.lang.Object
com.sun.xml.ws.encoding.StringDataContentHandler
- All Implemented Interfaces:
DataContentHandler
JavaMail's data content handler for text/plain -->String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetContent(DataSource ds) protected ActivationDataFlavorgetDF()Return the Transfer Data of type DataFlavor from InputStream.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()Default constructor.
-
-
Method Details
-
getDF
-
getTransferDataFlavors
Return the DataFlavors for thisDataContentHandler.- Specified by:
getTransferDataFlavorsin interfaceDataContentHandler- Returns:
- The DataFlavors
-
getTransferData
Return the Transfer Data of type DataFlavor from InputStream.- Specified by:
getTransferDatain interfaceDataContentHandler- Parameters:
df- The DataFlavords- The DataSource corresponding to the data- Returns:
- String object
- Throws:
IOException
-
getContent
- Specified by:
getContentin interfaceDataContentHandler- Throws:
IOException
-
writeTo
Write the object to the output stream, using the specified MIME type.- Specified by:
writeToin interfaceDataContentHandler- Throws:
IOException
-