Package com.sun.mail.handlers
Class text_xml
java.lang.Object
com.sun.mail.handlers.handler_base
com.sun.mail.handlers.text_plain
com.sun.mail.handlers.text_xml
- All Implemented Interfaces:
javax.activation.DataContentHandler
DataContentHandler for text/xml.
- Author:
- Anil Vijendran, Bill Shannon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectgetData(javax.activation.ActivationDataFlavor aFlavor, javax.activation.DataSource ds) Given the flavor that matched, return the appropriate type of object.protected javax.activation.ActivationDataFlavor[]Return an array of ActivationDataFlavors that we support.voidwriteTo(Object obj, String mimeType, OutputStream os) Write the object to the output stream, using the specified MIME type.Methods inherited from class com.sun.mail.handlers.text_plain
getContentMethods inherited from class com.sun.mail.handlers.handler_base
getTransferData, getTransferDataFlavors
-
Constructor Details
-
text_xml
public text_xml()
-
-
Method Details
-
getDataFlavors
protected javax.activation.ActivationDataFlavor[] getDataFlavors()Description copied from class:handler_baseReturn an array of ActivationDataFlavors that we support. Usually there will be only one.- Overrides:
getDataFlavorsin classtext_plain- Returns:
- array of ActivationDataFlavors that we support
-
getData
protected Object getData(javax.activation.ActivationDataFlavor aFlavor, javax.activation.DataSource ds) throws IOException Description copied from class:handler_baseGiven the flavor that matched, return the appropriate type of object. Usually there's only one flavor so just call getContent.- Overrides:
getDatain classhandler_base- Parameters:
aFlavor- the ActivationDataFlavords- DataSource containing the data- Returns:
- the object
- Throws:
IOException- for errors reading the data
-
writeTo
Description copied from class:text_plainWrite the object to the output stream, using the specified MIME type.- Specified by:
writeToin interfacejavax.activation.DataContentHandler- Overrides:
writeToin classtext_plain- Throws:
IOException
-