本文整理汇总了Java中org.apache.james.mime4j.dom.address.AddressList类的典型用法代码示例。如果您正苦于以下问题:Java AddressList类的具体用法?Java AddressList怎么用?Java AddressList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AddressList类属于org.apache.james.mime4j.dom.address包,在下文中一共展示了AddressList类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processAddressList
import org.apache.james.mime4j.dom.address.AddressList; //导入依赖的package包/类
private void processAddressList(ParsedField field, String addressListType,
String metadataField) throws MimeException {
AddressListField toField = (AddressListField) field;
if (toField.isValidField()) {
AddressList addressList = toField.getAddressList();
for (int i = 0; i < addressList.size(); ++i) {
metadata.add(metadataField, getDisplayString(addressList.get(i)));
}
} else {
String to = stripOutFieldPrefix(field,
addressListType);
for (String eachTo : to.split(",")) {
metadata.add(metadataField, eachTo.trim());
}
}
}
示例2: parseMailAddress
import org.apache.james.mime4j.dom.address.AddressList; //导入依赖的package包/类
private List<String> parseMailAddress(AddressList addressList) {
if (addressList == null) {
return null;
}
return parseMailAddress(addressList.flatten());
}
示例3: makeMailboxSet
import org.apache.james.mime4j.dom.address.AddressList; //导入依赖的package包/类
private Set<Mailbox> makeMailboxSet (final AddressList mime4jAddressList)
{
return mime4jAddressList == null ? Collections.<Mailbox>emptySet() : makeMailboxSet(mime4jAddressList.flatten());
}