}
// Processing DataSource type
if (MimePartDataSource.class.isAssignableFrom(type)) {
// Support JavaMail MimePart DataSource type
obj = new MimePartDataSource(new MimeBodyPart(is));
} else if (ByteArrayDataSource.class.isAssignableFrom(type)
|| DataSource.class.isAssignableFrom(type)) {
// Support JavaMail ByteArrayDataSource
obj = new ByteArrayDataSource(is, null);
}