- java.lang.Object
-
- com.sun.xml.ws.encoding.StringDataContentHandler
-
- All Implemented Interfaces:
DataContentHandler
public class StringDataContentHandler extends Object implements 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(DataSource ds)protected ActivationDataFlavorgetDF()ObjectgetTransferData(DataFlavor df, 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 ActivationDataFlavor getDF()
-
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
Return the DataFlavors for thisDataContentHandler.- Specified by:
getTransferDataFlavorsin interfaceDataContentHandler- Returns:
- The DataFlavors
-
getTransferData
public Object getTransferData(DataFlavor df, DataSource ds) throws IOException
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
public Object getContent(DataSource ds) throws IOException
- Specified by:
getContentin interfaceDataContentHandler- 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 interfaceDataContentHandler- Throws:
IOException
-
-