Top Description Fields Constructors Methods
com.sun.mail.handlers

public Class text_xml

extends text_plain
Class Inheritance
Imports
java.io.IOException, .OutputStream, javax.activation.ActivationDataFlavor, .DataSource, javax.mail.internet.ContentType, .ParseException, javax.xml.transform.Source, javax.xml.transform.Transformer, javax.xml.transform.TransformerFactory, javax.xml.transform.TransformerException, javax.xml.transform.stream.StreamResult, javax.xml.transform.stream.StreamSource

DataContentHandler for text/xml.
Authors
Anil Vijendran, Bill Shannon

Field Summary

Modifier and TypeField and Description
private static final ActivationDataFlavor[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Object
getData(ActivationDataFlavor
the ActivationDataFlavor
aFlavor
,
DataSource
DataSource containing the data
ds
)

Overrides com.sun.mail.handlers.handler_base.getData.

Given the flavor that matched, return the appropriate type of object.
protected ActivationDataFlavor[]
getDataFlavors()

Overrides com.sun.mail.handlers.text_plain.getDataFlavors.

Return an array of ActivationDataFlavors that we support.
private boolean
public void
writeTo(Object
The object to be converted.
obj
,
String
The requested MIME type of the resulting byte stream.
mimeType
,
OutputStream
The output stream into which to write the converted byte stream.
os
)

Overrides com.sun.mail.handlers.text_plain.writeTo.

Implements javax.activation.DataContentHandler.writeTo.

Write the object to the output stream, using the specified MIME type.
Inherited from com.sun.mail.handlers.text_plain:
getContent

Field Detail

flavorsback to summary
private static final ActivationDataFlavor[] flavors

Constructor Detail

text_xmlback to summary
public text_xml()

Method Detail

getDataback to summary
protected Object getData(ActivationDataFlavor aFlavor, DataSource ds) throws IOException

Overrides com.sun.mail.handlers.handler_base.getData.

Doc from com.sun.mail.handlers.handler_base.getData.

Given the flavor that matched, return the appropriate type of object. Usually there's only one flavor so just call getContent.

Parameters
aFlavor:ActivationDataFlavor

the ActivationDataFlavor

ds:DataSource

DataSource containing the data

Returns:Object

the object

Annotations
@Override
Exceptions
IOException:
for errors reading the data
getDataFlavorsback to summary
protected ActivationDataFlavor[] getDataFlavors()

Overrides com.sun.mail.handlers.text_plain.getDataFlavors.

Doc from com.sun.mail.handlers.handler_base.getDataFlavors.

Return an array of ActivationDataFlavors that we support. Usually there will be only one.

Returns:ActivationDataFlavor[]

array of ActivationDataFlavors that we support

Annotations
@Override
isXmlTypeback to summary
private boolean isXmlType(String type)
writeToback to summary
public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException

Overrides com.sun.mail.handlers.text_plain.writeTo.

Implements javax.activation.DataContentHandler.writeTo.

Doc from com.sun.mail.handlers.text_plain.writeTo.

Write the object to the output stream, using the specified MIME type.

Parameters
obj:Object

Doc from javax.activation.DataContentHandler.writeTo.

The object to be converted.

mimeType:String

Doc from javax.activation.DataContentHandler.writeTo.

The requested MIME type of the resulting byte stream.

os:OutputStream

Doc from javax.activation.DataContentHandler.writeTo.

The output stream into which to write the converted byte stream.

Annotations
@Override
Exceptions
IOException:

Doc from javax.activation.DataContentHandler.writeTo.

errors writing to the stream