dh = new DataHandler(new StringDataSource((String) object, name));
}
}
else if (object instanceof byte[] && contentType != null)
{
dh = new DataHandler(new ByteArrayDataSource((byte[]) object, contentType, name));
}
else
{
dh = new DataHandler(object, contentType);
}