本文整理了Java中org.apache.camel.Message.hasAttachments()
方法的一些代码示例,展示了Message.hasAttachments()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.hasAttachments()
方法的具体详情如下:
包路径:org.apache.camel.Message
类名称:Message
方法名:hasAttachments
暂无
代码示例来源:origin: org.apache.camel/camel-mail
private MimeMultipart createMixedMultipartAttachments(MailConfiguration configuration, Exchange exchange)
throws MessagingException, IOException {
// fill the body with text
MimeMultipart multipart = new MimeMultipart();
multipart.setSubType("mixed");
addBodyToMultipart(configuration, multipart, exchange);
String partDisposition = configuration.isUseInlineAttachments() ? Part.INLINE : Part.ATTACHMENT;
AttachmentsContentTransferEncodingResolver contentTransferEncodingResolver = configuration.getAttachmentsContentTransferEncodingResolver();
if (exchange.getIn().hasAttachments()) {
addAttachmentsToMultipart(multipart, partDisposition, contentTransferEncodingResolver, exchange);
}
return multipart;
}
代码示例来源:origin: org.apache.camel/camel-mail
if (!exchange.getIn().hasAttachments()) {
addBodyToMultipart(configuration, multipartAlternative, exchange);
} else {
代码示例来源:origin: org.apache.camel/camel-mail
@Override
public void marshal(Exchange exchange, Object graph, OutputStream stream)
throws NoTypeConversionAvailableException, MessagingException, IOException {
if (multipartWithoutAttachment || headersInline || exchange.getIn().hasAttachments()) {
ContentType contentType = getContentType(exchange);
代码示例来源:origin: org.apache.camel/camel-jms
if (that.hasAttachments()) {
getAttachmentObjects().putAll(that.getAttachmentObjects());
代码示例来源:origin: org.apache.camel/camel-mail
createMultipartAlternativeMessage(mimeMessage, endpoint.getConfiguration(), exchange);
} else {
if (exchange.getIn().hasAttachments()) {
appendAttachmentsFromCamel(mimeMessage, endpoint.getConfiguration(), exchange);
} else {
内容来源于网络,如有侵权,请联系作者删除!