本文整理了Java中javax.mail.internet.MimeMessage.getMatchingHeaders()
方法的一些代码示例,展示了MimeMessage.getMatchingHeaders()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MimeMessage.getMatchingHeaders()
方法的具体详情如下:
包路径:javax.mail.internet.MimeMessage
类名称:MimeMessage
方法名:getMatchingHeaders
[英]Return matching headers from this Message as an Enumeration of Header objects. This implementation obtains the headers from the headers
InternetHeaders object.
[中]将此消息中的匹配标头作为标头对象的枚举返回。此实现从headers
InternetHeaders对象获取头。
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Get matching headers.
*/
@SuppressWarnings("unchecked")
public Enumeration<Header> getMatchingHeaders(String[] names)
throws MessagingException {
checkExpunged();
loadHeaders();
return super.getMatchingHeaders(names);
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Get matching headers.
*/
@Override
public Enumeration<Header> getMatchingHeaders(String[] names)
throws MessagingException {
checkExpunged();
loadHeaders();
return super.getMatchingHeaders(names);
}
代码示例来源:origin: org.apache.geronimo.javamail/geronimo-javamail_1.4_provider
public Enumeration getMatchingHeaders(String[] names) throws MessagingException {
// make sure the headers are loaded
loadHeaders();
// allow the super class to handle everything from here
return super.getMatchingHeaders(names);
}
代码示例来源:origin: org.apache.james/james-server-core-library
/**
* @see javax.mail.Part#getMatchingHeaders(java.lang.String[])
*/
public Enumeration getMatchingHeaders(String[] names)
throws MessagingException {
return getWrappedMessage().getMatchingHeaders(names);
}
代码示例来源:origin: org.apache.james/apache-mailet-base
private boolean headerIsMailingList(Mail mail) throws MessagingException {
return mail.getMessage()
.getMatchingHeaders(MAILING_LIST_HEADERS)
.hasMoreElements();
}
代码示例来源:origin: org.apache.james/james-server-mailets
private void copyRelevantHeaders(MimeMessage originalMessage, MimeMessage newMessage) throws MessagingException {
Enumeration<Header> headerEnum = originalMessage.getMatchingHeaders(
new String[] { RFC2822Headers.DATE, RFC2822Headers.FROM, RFC2822Headers.REPLY_TO, RFC2822Headers.TO,
RFC2822Headers.SUBJECT, RFC2822Headers.RETURN_PATH });
while (headerEnum.hasMoreElements()) {
Header header = headerEnum.nextElement();
newMessage.addHeader(header.getName(), header.getValue());
}
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Get matching headers.
*/
@Override
public Enumeration<Header> getMatchingHeaders(String[] names)
throws MessagingException {
checkExpunged();
loadHeaders();
return super.getMatchingHeaders(names);
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Get matching headers.
*/
@Override
public Enumeration<Header> getMatchingHeaders(String[] names)
throws MessagingException {
checkExpunged();
loadHeaders();
return super.getMatchingHeaders(names);
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Get matching headers.
*/
@Override
public Enumeration<Header> getMatchingHeaders(String[] names)
throws MessagingException {
checkExpunged();
loadHeaders();
return super.getMatchingHeaders(names);
}
代码示例来源:origin: javax.mail/com.springsource.javax.mail
/**
* Get matching headers.
*/
public Enumeration getMatchingHeaders(String[] names)
throws MessagingException {
checkExpunged();
loadHeaders();
return super.getMatchingHeaders(names);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail
/**
* Get matching headers.
*/
public Enumeration getMatchingHeaders(String[] names)
throws MessagingException {
checkExpunged();
loadHeaders();
return super.getMatchingHeaders(names);
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Get matching headers.
*/
@Override
public Enumeration<Header> getMatchingHeaders(String[] names)
throws MessagingException {
checkExpunged();
loadHeaders();
return super.getMatchingHeaders(names);
}
代码示例来源:origin: org.mnode.mstor/mstor
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
public Enumeration<Header> getMatchingHeaders(final String[] names)
throws MessagingException {
InternetHeaders headers = getHeaders();
if (headers != null) {
return (Enumeration<Header>) headers.getMatchingHeaders(names);
}
checkParse();
return (Enumeration<Header>) super.getMatchingHeaders(names);
}
代码示例来源:origin: org.apache.james/apache-jsieve-mailet
.getMatchingHeaders(new String[] { deliveryHeader });
while (headers.hasMoreElements()) {
Header header = (Header) headers.nextElement();
内容来源于网络,如有侵权,请联系作者删除!