Methods Summary |
---|
public java.lang.Object | getContent(javax.activation.DataSource _ds)
ADF = new ActivationDataFlavor(MimeBodyPart.class, "application/x-pkcs7-signature", "Signature");
ADFs = new DataFlavor[] { ADF };
return _ds.getInputStream();
|
public java.lang.Object | getTransferData(java.awt.datatransfer.DataFlavor _df, javax.activation.DataSource _ds)
if (ADF.equals(_df))
{
return getContent(_ds);
}
else
{
return null;
}
|
public java.awt.datatransfer.DataFlavor[] | getTransferDataFlavors()
return ADFs;
|
public void | writeTo(java.lang.Object _obj, java.lang.String _mimeType, java.io.OutputStream _os)
if (_obj instanceof MimeBodyPart)
{
try
{
((MimeBodyPart)_obj).writeTo(_os);
}
catch (MessagingException ex)
{
throw new IOException(ex.getMessage());
}
}
else if (_obj instanceof byte[])
{
_os.write((byte[])_obj);
}
else if (_obj instanceof InputStream)
{
int b;
InputStream in = (InputStream)_obj;
while ((b = in.read()) >= 0)
{
_os.write(b);
}
}
else
{
throw new IOException("unknown object in writeTo " + _obj);
}
|