本文整理了Java中javax.mail.internet.MimeBodyPart.getAllHeaders()
方法的一些代码示例,展示了MimeBodyPart.getAllHeaders()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MimeBodyPart.getAllHeaders()
方法的具体详情如下:
包路径:javax.mail.internet.MimeBodyPart
类名称:MimeBodyPart
方法名:getAllHeaders
[英]Return all the headers from this Message as an Enumeration of Header objects.
[中]将此消息中的所有标头作为标头对象的枚举返回。
代码示例来源:origin: camunda/camunda-bpm-platform
@SuppressWarnings("unchecked")
public Enumeration<Header> getAllHeaders() throws MessagingException {
loadHeaders();
return super.getAllHeaders();
}
代码示例来源:origin: com.sun.mail/javax.mail
@Override
public Enumeration<Header> getAllHeaders() throws MessagingException {
loadHeaders();
return super.getAllHeaders();
}
代码示例来源:origin: resteasy/Resteasy
try
e = decrypted.getAllHeaders();
代码示例来源:origin: com.sun.mail/jakarta.mail
@Override
public Enumeration<Header> getAllHeaders() throws MessagingException {
loadHeaders();
return super.getAllHeaders();
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
@Override
public Enumeration<Header> getAllHeaders() throws MessagingException {
loadHeaders();
return super.getAllHeaders();
}
代码示例来源:origin: com.sun.mail/android-mail
@Override
public Enumeration<Header> getAllHeaders() throws MessagingException {
loadHeaders();
return super.getAllHeaders();
}
代码示例来源:origin: jboss/jboss-javaee-specs
@Override
public Enumeration<Header> getAllHeaders() throws MessagingException {
loadHeaders();
return super.getAllHeaders();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail
public Enumeration getAllHeaders() throws MessagingException {
loadHeaders();
return super.getAllHeaders();
}
代码示例来源:origin: javax.mail/com.springsource.javax.mail
public Enumeration getAllHeaders() throws MessagingException {
loadHeaders();
return super.getAllHeaders();
}
代码示例来源:origin: axis/axis
/**
* Gets the header length for any part.
* @param bp the part to determine the header length for.
* @return the length in bytes.
*
* @throws javax.mail.MessagingException
* @throws java.io.IOException
*/
private static long getHeaderLength(javax.mail.internet.MimeBodyPart bp)
throws javax.mail.MessagingException, java.io.IOException {
javax.mail.internet.MimeBodyPart headersOnly =
new javax.mail.internet.MimeBodyPart(
new javax.mail.internet.InternetHeaders(), new byte[0]);
for (java.util.Enumeration en = bp.getAllHeaders();
en.hasMoreElements();) {
javax.mail.Header header = (javax.mail.Header) en.nextElement();
headersOnly.addHeader(header.getName(), header.getValue());
}
java.io.ByteArrayOutputStream bas =
new java.io.ByteArrayOutputStream(1024 * 16);
headersOnly.writeTo(bas);
bas.close();
return (long) bas.size(); // This has header length plus the crlf part that seperates the data
}
代码示例来源:origin: org.apache.axis/axis
/**
* Gets the header length for any part.
* @param bp the part to determine the header length for.
* @return the length in bytes.
*
* @throws javax.mail.MessagingException
* @throws java.io.IOException
*/
private static long getHeaderLength(javax.mail.internet.MimeBodyPart bp)
throws javax.mail.MessagingException, java.io.IOException {
javax.mail.internet.MimeBodyPart headersOnly =
new javax.mail.internet.MimeBodyPart(
new javax.mail.internet.InternetHeaders(), new byte[0]);
for (java.util.Enumeration en = bp.getAllHeaders();
en.hasMoreElements();) {
javax.mail.Header header = (javax.mail.Header) en.nextElement();
headersOnly.addHeader(header.getName(), header.getValue());
}
java.io.ByteArrayOutputStream bas =
new java.io.ByteArrayOutputStream(1024 * 16);
headersOnly.writeTo(bas);
bas.close();
return (long) bas.size(); // This has header length plus the crlf part that seperates the data
}
代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis
/**
* Gets the header length for any part.
* @param bp the part to determine the header length for.
* @return the length in bytes.
*
* @throws javax.mail.MessagingException
* @throws java.io.IOException
*/
private static long getHeaderLength(javax.mail.internet.MimeBodyPart bp)
throws javax.mail.MessagingException, java.io.IOException {
javax.mail.internet.MimeBodyPart headersOnly =
new javax.mail.internet.MimeBodyPart(
new javax.mail.internet.InternetHeaders(), new byte[0]);
for (java.util.Enumeration en = bp.getAllHeaders();
en.hasMoreElements();) {
javax.mail.Header header = (javax.mail.Header) en.nextElement();
headersOnly.addHeader(header.getName(), header.getValue());
}
java.io.ByteArrayOutputStream bas =
new java.io.ByteArrayOutputStream(1024 * 16);
headersOnly.writeTo(bas);
bas.close();
return (long) bas.size(); // This has header length plus the crlf part that seperates the data
}
代码示例来源:origin: OpenAS2/OpenAs2App
logger.trace("Calculating MIC on MIMEPART Headers: " + AS2Util.printHeaders(part.getAllHeaders()));
代码示例来源:origin: OpenAS2/OpenAs2App
+ "\n Content-Type : " + msg.getContentType()
+ "\n Retries : " + retries
+ "\n HEADERS : " + AS2Util.printHeaders(msg.getData().getAllHeaders())
+ "\n Content-Disposition in MSG getData() MIMEPART: "
+ msg.getData().getContentType()
代码示例来源:origin: OpenAS2/OpenAs2App
public MimeBodyPart encrypt(MimeBodyPart part, Certificate cert, String algorithm, String contentTxfrEncoding)
throws GeneralSecurityException, SMIMEException, MessagingException
{
X509Certificate x509Cert = castCertificate(cert);
SMIMEEnvelopedGenerator gen = new SMIMEEnvelopedGenerator();
gen.setContentTransferEncoding(getEncoding(contentTxfrEncoding));
if (logger.isDebugEnabled())
{
logger.debug("Encrypting on MIME part containing the following headers: " + AS2Util.printHeaders(part.getAllHeaders()));
}
gen.addRecipientInfoGenerator(new JceKeyTransRecipientInfoGenerator(x509Cert).setProvider("BC"));
return gen.generate(part, getOutputEncryptor(algorithm));
}
代码示例来源:origin: OpenAS2/OpenAs2App
+ "\n HEADERS : " + AS2Util.printHeaders(msg.getData().getAllHeaders())
+ "\n Content-Disposition in MSG getData() MIMEPART: "
+ msg.getData().getContentType()
代码示例来源:origin: OpenAS2/OpenAs2App
+ " PUB ENCRYPT ALG: " + encryptAlg
+ " X509 CERT: " + x509Cert);
logger.debug("Signing on MIME part containing the following headers: " + AS2Util.printHeaders(part.getAllHeaders()));
代码示例来源:origin: OpenAS2/OpenAs2App
try
headers = AS2Util.printHeaders(part.getAllHeaders());
logger.trace("Headers on MimeBodyPart passed in to signature verifier: " + headers);
headers = AS2Util.printHeaders(ssp.getContent().getAllHeaders());
logger.trace("Checking signature on SIGNED MIME part extracted from multipart contains headers: " + headers);
} catch (Throwable e)
代码示例来源:origin: com.axway.ats.framework/ats-actionlibrary
.build());
encryptedMessage.setContent(mp.getContent(), mp.getContentType());
Enumeration<?> mpEnum = mp.getAllHeaders();
while (mpEnum.hasMoreElements()) {
Header current = (Header) mpEnum.nextElement();
代码示例来源:origin: com.helger/ph-as4-lib
final Enumeration <?> aEnum = aBodyPart.getAllHeaders ();
while (aEnum.hasMoreElements ())
内容来源于网络,如有侵权,请联系作者删除!