Methods Summary |
---|
public java.lang.Object | getContent(javax.activation.DataSource ds)Return the content.
try {
return new MimeMultipart(ds);
} catch (MessagingException e) {
IOException ioex =
new IOException("Exception while constructing MimeMultipart");
ioex.initCause(e);
throw ioex;
}
|
public java.lang.Object | getTransferData(java.awt.datatransfer.DataFlavor df, javax.activation.DataSource ds)Return the Transfer Data of type DataFlavor from InputStream.
// use myDF.equals to be sure to get ActivationDataFlavor.equals,
// which properly ignores Content-Type parameters in comparison
if (myDF.equals(df))
return getContent(ds);
else
return null;
|
public java.awt.datatransfer.DataFlavor[] | getTransferDataFlavors()Return the DataFlavors for this DataContentHandler .
// throws Exception;
return new DataFlavor[] { myDF };
|
public void | writeTo(java.lang.Object obj, java.lang.String mimeType, java.io.OutputStream os)Write the object to the output stream, using the specific MIME type.
if (obj instanceof MimeMultipart) {
try {
((MimeMultipart)obj).writeTo(os);
} catch (MessagingException e) {
throw new IOException(e.toString());
}
}
|