本文整理了Java中com.sun.mail.imap.protocol.BODY.getByteArrayInputStream()
方法的一些代码示例,展示了BODY.getByteArrayInputStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BODY.getByteArrayInputStream()
方法的具体详情如下:
包路径:com.sun.mail.imap.protocol.BODY
类名称:BODY
方法名:getByteArrayInputStream
暂无
代码示例来源:origin: stackoverflow.com
fetch = (FetchResponse) r[i];
body = (BODY) fetch.getItem(0);
is = body.getByteArrayInputStream();
try {
mm = new MimeMessage(session, is);
代码示例来源:origin: camunda/camunda-bpm-platform
} else { // IMAP4rev1
headerStream =
((BODY)item).getByteArrayInputStream();
isHeader = ((BODY)item).isHeader();
代码示例来源:origin: com.sun.mail/javax.mail
} else { // IMAP4rev1
headerStream =
((BODY)item).getByteArrayInputStream();
isHeader = ((BODY)item).isHeader();
代码示例来源:origin: com.sun.mail/javax.mail
b = p.fetchBody(seqnum, sectionId);
if (b != null)
is = b.getByteArrayInputStream();
} catch (ConnectionException cex) {
throw new FolderClosedException(
代码示例来源:origin: com.sun.mail/javax.mail
throw new MessagingException("Failed to fetch headers");
ByteArrayInputStream bis = b.getByteArrayInputStream();
if (bis == null)
throw new MessagingException("Failed to fetch headers");
代码示例来源:origin: camunda/camunda-bpm-platform
throw new MessagingException("Failed to fetch headers");
ByteArrayInputStream bis = b.getByteArrayInputStream();
if (bis == null)
throw new MessagingException("Failed to fetch headers");
代码示例来源:origin: stackoverflow.com
FetchResponse fetch = (FetchResponse) r[i];
BODY body = (BODY) fetch.getItem(0);
ByteArrayInputStream is = body.getByteArrayInputStream();
MimeMessage mm = new MimeMessage(session, is);
代码示例来源:origin: camunda/camunda-bpm-platform
b = p.fetchBody(seqnum, sectionId);
if (b != null)
is = b.getByteArrayInputStream();
} catch (ConnectionException cex) {
throw new FolderClosedException(
代码示例来源:origin: com.sun.mail/javax.mail
toSection("HEADER"));
if (b != null)
is = b.getByteArrayInputStream();
} else {
RFC822DATA rd = p.fetchRFC822(getSequenceNumber(),
代码示例来源:origin: com.sun.mail/javax.mail
b = p.fetchBody(getSequenceNumber(), sectionId);
if (b != null)
is = b.getByteArrayInputStream();
} else {
RFC822DATA rd = p.fetchRFC822(getSequenceNumber(), null);
代码示例来源:origin: camunda/camunda-bpm-platform
toSection("HEADER"));
if (b != null)
is = b.getByteArrayInputStream();
} else {
RFC822DATA rd = p.fetchRFC822(getSequenceNumber(),
代码示例来源:origin: camunda/camunda-bpm-platform
throw new MessagingException("Failed to fetch headers");
ByteArrayInputStream bis = b.getByteArrayInputStream();
if (bis == null)
throw new MessagingException("Failed to fetch headers");
代码示例来源:origin: com.sun.mail/javax.mail
b = p.fetchBody(getSequenceNumber(), toSection("TEXT"));
if (b != null)
is = b.getByteArrayInputStream();
} else {
RFC822DATA rd = p.fetchRFC822(getSequenceNumber(), "TEXT");
代码示例来源:origin: com.sun.mail/javax.mail
throw new MessagingException("Failed to fetch headers");
ByteArrayInputStream bis = b.getByteArrayInputStream();
if (bis == null)
throw new MessagingException("Failed to fetch headers");
代码示例来源:origin: camunda/camunda-bpm-platform
b = p.fetchBody(getSequenceNumber(), sectionId);
if (b != null)
is = b.getByteArrayInputStream();
} else {
RFC822DATA rd = p.fetchRFC822(getSequenceNumber(), null);
代码示例来源:origin: camunda/camunda-bpm-platform
);
if (b != null)
is = b.getByteArrayInputStream();
} else {
RFC822DATA rd = p.fetchRFC822(getSequenceNumber(),
代码示例来源:origin: com.sun.mail/javax.mail
);
if (b != null)
is = b.getByteArrayInputStream();
} else {
RFC822DATA rd = p.fetchRFC822(getSequenceNumber(),
代码示例来源:origin: camunda/camunda-bpm-platform
b = p.fetchBody(getSequenceNumber(), toSection("TEXT"));
if (b != null)
is = b.getByteArrayInputStream();
} else {
RFC822DATA rd = p.fetchRFC822(getSequenceNumber(), "TEXT");
代码示例来源:origin: Alfresco/alfresco-repository
public void testUnmodifiedMessage() throws Exception
{
// Get test message UID
final Long uid = getMessageUid(folder, 1);
// Get Message size
final int count = getMessageSize(folder, uid);
// Make multiple message reading
for (int i = 0; i < 100; i++)
{
// Get random offset
int n = (int) ((int) 100 * Math.random());
// Get first part
BODY body = getMessageBodyPart(folder, uid, 0, count - n);
// Read second message part
BODY bodyRest = getMessageBodyPart(folder, uid, count - n, n);
// Creating and parsing message from 2 parts
MimeMessage message = new MimeMessage(Session.getDefaultInstance(new Properties()), new SequenceInputStream(new BufferedInputStream(body.getByteArrayInputStream()),
new BufferedInputStream(bodyRest.getByteArrayInputStream())));
MimeMultipart content = (MimeMultipart) message.getContent();
// Reading first part - should be successful
assertNotNull(content.getBodyPart(0).getContent());
// Reading second part - should be successful
assertNotNull(content.getBodyPart(1).getContent());
}
}
代码示例来源:origin: javax.mail/com.springsource.javax.mail
b = p.fetchBody(seqnum, sectionId);
if (b != null)
is = b.getByteArrayInputStream();
} catch (ConnectionException cex) {
throw new FolderClosedException(
内容来源于网络,如有侵权,请联系作者删除!