本文整理了Java中javax.mail.internet.MimeMultipart.updateHeaders()
方法的一些代码示例,展示了MimeMultipart.updateHeaders()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MimeMultipart.updateHeaders()
方法的具体详情如下:
包路径:javax.mail.internet.MimeMultipart
类名称:MimeMultipart
方法名:updateHeaders
[英]Update headers. The default implementation here just calls the updateHeaders
method on each of its children BodyParts.
Note that the boundary parameter is already set up when a new and empty MimeMultipart object is created.
This method is called when the saveChanges
method is invoked on the Message object containing this Multipart. This is typically done as part of the Message send process, however note that a client is free to call it any number of times. So if the header updating process is expensive for a specific MimeMultipart subclass, then it might itself want to track whether its internal state actually did change, and do the header updating only if necessary.
[中]更新标题。这里的默认实现只是对其每个子BodyPart调用updateHeaders
方法。
请注意,创建新的空MimeMultipart对象时,已设置边界参数。
在包含此多部分的消息对象上调用saveChanges
方法时,将调用此方法。这通常是作为消息发送过程的一部分完成的,但是请注意,客户机可以任意调用它多次。因此,如果特定的MimeMultipart子类的头更新过程代价高昂,那么它本身可能希望跟踪其内部状态是否确实发生了更改,并且仅在必要时才进行头更新。
代码示例来源:origin: camunda/camunda-bpm-platform
o = dh.getContent();
if (o instanceof MimeMultipart)
((MimeMultipart)o).updateHeaders();
else
throw new MessagingException("MIME part of type \"" +
代码示例来源:origin: com.sun.mail/javax.mail
o = dh.getContent();
if (o instanceof MimeMultipart)
((MimeMultipart)o).updateHeaders();
else
throw new MessagingException("MIME part of type \"" +
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail
o = dh.getContent();
if (o instanceof MimeMultipart)
((MimeMultipart)o).updateHeaders();
else
throw new MessagingException("MIME part of type \"" +
代码示例来源:origin: javax.mail/com.springsource.javax.mail
o = dh.getContent();
if (o instanceof MimeMultipart)
((MimeMultipart)o).updateHeaders();
else
throw new MessagingException("MIME part of type \"" +
代码示例来源:origin: com.sun.mail/android-mail
o = dh.getContent();
if (o instanceof MimeMultipart)
((MimeMultipart)o).updateHeaders();
else
throw new MessagingException("MIME part of type \"" +
代码示例来源:origin: com.sun.mail/mailapi
o = dh.getContent();
if (o instanceof MimeMultipart)
((MimeMultipart)o).updateHeaders();
else
throw new MessagingException("MIME part of type \"" +
代码示例来源:origin: com.sun.mail/jakarta.mail
o = dh.getContent();
if (o instanceof MimeMultipart)
((MimeMultipart)o).updateHeaders();
else
throw new MessagingException("MIME part of type \"" +
代码示例来源:origin: javax.mail/javax.mail-api
o = dh.getContent();
if (o instanceof MimeMultipart)
((MimeMultipart)o).updateHeaders();
else
throw new MessagingException("MIME part of type \"" +
代码示例来源:origin: org.apache.geronimo.specs/geronimo-javamail_1.4_spec
part.updateHeaders();
} catch (ClassCastException e) {
throw new MessagingException("Message content is not MimeMultipart", e);
代码示例来源:origin: jboss/jboss-javaee-specs
o = dh.getContent();
if (o instanceof MimeMultipart)
((MimeMultipart)o).updateHeaders();
else
throw new MessagingException("MIME part of type \"" +
代码示例来源:origin: org.apache.geronimo.specs/geronimo-javamail_1.3.1_spec
part.updateHeaders();
} catch (ClassCastException e) {
throw new MessagingException("Message content is not MimeMultipart", e);
代码示例来源:origin: org.glassfish.metro/webservices-extra
o = dh.getContent();
if (o instanceof MimeMultipart)
((MimeMultipart)o).updateHeaders();
else
throw new MessagingException("MIME part of type \"" +
代码示例来源:origin: org.apache.geronimo.specs/geronimo-javamail_1.3.1_spec
part.updateHeaders();
} catch (ClassCastException e) {
throw new MessagingException("Message content is not MimeMultipart", e);
代码示例来源:origin: org.apache.geronimo.specs/geronimo-javamail_1.4_spec
part.updateHeaders();
} catch (ClassCastException e) {
throw new MessagingException("Message content is not MimeMultipart", e);
内容来源于网络,如有侵权,请联系作者删除!