} else if (o instanceof ContentTypeField) {
/*
* Content-Type field.
*/
ContentTypeField field = (ContentTypeField) o;
StringBuffer sb = new StringBuffer();
sb.append("MIME type: " + field.getMimeType() + "\n");
Map params = field.getParameters();
for (Iterator it = params.keySet().iterator(); it.hasNext();) {
String name = (String) it.next();
sb.append(name + " = " + params.get(name) + "\n");
}
textView.setText(sb.toString());
} else if (o instanceof AddressListField) {
/*
* An address field (From, To, Cc, etc)
*/
AddressListField field = (AddressListField) o;
MailboxList list = field.getAddressList().flatten();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < list.size(); i++) {
Mailbox mb = list.get(i);
sb.append(mb.getAddressString() + "\n");
}