Methods Summary |
---|
public java.lang.Object | getContent(javax.activation.DataSource ds)Return the content.
try {
return new MultipartReport(ds);
} catch (MessagingException e) {
IOException ioex =
new IOException("Exception while constructing MultipartReport");
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 MultipartReport) {
try {
((MultipartReport)obj).writeTo(os);
} catch (MessagingException e) {
throw new IOException(e.toString());
}
}
|