Package com.sun.xml.ws.encoding
Class StringDataContentHandler
- java.lang.Object
-
- com.sun.xml.ws.encoding.StringDataContentHandler
-
- All Implemented Interfaces:
javax.activation.DataContentHandler
public class StringDataContentHandler extends Object implements javax.activation.DataContentHandler
JavaMail's data content handler for text/plain -->String
-
-
Constructor Summary
Constructors Constructor Description StringDataContentHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetContent(javax.activation.DataSource ds)protected javax.activation.ActivationDataFlavorgetDF()ObjectgetTransferData(DataFlavor df, javax.activation.DataSource ds)Return the Transfer Data of type DataFlavor from InputStream.DataFlavor[]getTransferDataFlavors()Return the DataFlavors for thisDataContentHandler.voidwriteTo(Object obj, String type, OutputStream os)Write the object to the output stream, using the specified MIME type.
-
-
-
Method Detail
-
getDF
protected javax.activation.ActivationDataFlavor getDF()
-
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
Return the DataFlavors for thisDataContentHandler.- Specified by:
getTransferDataFlavorsin interfacejavax.activation.DataContentHandler- Returns:
- The DataFlavors
-
getTransferData
public Object getTransferData(DataFlavor df, javax.activation.DataSource ds) throws IOException
Return the Transfer Data of type DataFlavor from InputStream.- Specified by:
getTransferDatain interfacejavax.activation.DataContentHandler- Parameters:
df- The DataFlavords- The DataSource corresponding to the data- Returns:
- String object
- Throws:
IOException
-
getContent
public Object getContent(javax.activation.DataSource ds) throws IOException
- Specified by:
getContentin interfacejavax.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:
writeToin interfacejavax.activation.DataContentHandler- Throws:
IOException
-
-