com.fsck.k9.mail.Address.unpack()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中com.fsck.k9.mail.Address.unpack()方法的一些代码示例,展示了Address.unpack()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.unpack()方法的具体详情如下:
包路径:com.fsck.k9.mail.Address
类名称:Address
方法名:unpack

Address.unpack介绍

[英]Unpacks an address list previously packed with packAddressList()
[中]解压缩以前使用PackageAddressList()打包的地址列表

代码示例

代码示例来源:origin: k9mail/k-9

static String getSenderAddressFromCursor(Cursor cursor) {
  String fromList = cursor.getString(SENDER_LIST_COLUMN);
  Address[] fromAddrs = Address.unpack(fromList);
  return (fromAddrs.length > 0) ? fromAddrs[0].getAddress() : null;
}

代码示例来源:origin: k9mail/k-9

this.setSubject(subject == null ? "" : subject);
Address[] from = Address.unpack(cursor.getString(LocalStore.MSG_INDEX_SENDER_LIST));
if (from.length > 0) {
  this.setFrom(from[0]);
this.setRecipients(RecipientType.TO, Address.unpack(cursor.getString(LocalStore.MSG_INDEX_TO)));
this.setRecipients(RecipientType.CC, Address.unpack(cursor.getString(LocalStore.MSG_INDEX_CC)));
this.setRecipients(RecipientType.BCC, Address.unpack(cursor.getString(LocalStore.MSG_INDEX_BCC)));
this.setReplyTo(Address.unpack(cursor.getString(LocalStore.MSG_INDEX_REPLY_TO)));

代码示例来源:origin: k9mail/k-9

String toList = cursor.getString(TO_LIST_COLUMN);
String ccList = cursor.getString(CC_LIST_COLUMN);
Address[] fromAddrs = Address.unpack(fromList);
Address[] toAddrs = Address.unpack(toList);
Address[] ccAddrs = Address.unpack(ccList);

相关文章