javax.mail.internet.MimeMessage.getLineCount()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中javax.mail.internet.MimeMessage.getLineCount()方法的一些代码示例,展示了MimeMessage.getLineCount()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MimeMessage.getLineCount()方法的具体详情如下:
包路径:javax.mail.internet.MimeMessage
类名称:MimeMessage
方法名:getLineCount

MimeMessage.getLineCount介绍

[英]Return the number of lines for the content of this message. Return -1 if this number cannot be determined.

Note that this number may not be an exact measure of the content length and may or may not account for any transfer encoding of the content.

This implementation returns -1.
[中]返回此消息内容的行数。如果无法确定此数字,则返回-1。
请注意,这个数字可能不是内容长度的精确测量值,也可能不是内容传输编码的原因。
这个实现返回-1。

代码示例

代码示例来源:origin: spring-projects/spring-integration

@Override
public int getLineCount() throws MessagingException {
  /*
   * Basic MimeMessage always returns '-1'; delegate to the original.
   */
  return this.source.getLineCount();
}

代码示例来源:origin: spring-projects/spring-integration

int lineCount = source.getLineCount();
if (lineCount > 0) {
  headers.put(MailHeaders.LINE_COUNT, lineCount);

代码示例来源:origin: org.springframework.integration/spring-integration-mail

@Override
public int getLineCount() throws MessagingException {
  /*
   * Basic MimeMessage always returns '-1'; delegate to the original.
   */
  return this.source.getLineCount();
}

代码示例来源:origin: org.apache.james/james-server-core-library

/**
 * @see javax.mail.Part#getLineCount()
 */
public int getLineCount() throws MessagingException {
  return getWrappedMessage().getLineCount();
}

代码示例来源:origin: spring-projects/spring-integration

assertNotNull(received);
assertNotNull(received.getPayload().getReceivedDate());
assertTrue(received.getPayload().getLineCount() > -1);
if (simple) {
  assertThat(received.getPayload().getContent(),

代码示例来源:origin: org.apache.james/apache-standard-mailets

if (mimeMessage.getLineCount() >= 0) {
  out.print(", Number of lines: " + mimeMessage.getLineCount());

代码示例来源:origin: org.apache.james/james-server-mailets

.append(LINE_BREAK));
if (message.getLineCount() >= 0) {
  builder.append("  Number of lines: " + message.getLineCount())
    .append(LINE_BREAK);

代码示例来源:origin: org.springframework.integration/spring-integration-mail

int lineCount = source.getLineCount();
if (lineCount > 0) {
  headers.put(MailHeaders.LINE_COUNT, lineCount);

代码示例来源:origin: org.codelibs.fess/fess-crawler

putValue(data, "File-Name", message.getFileName());
putValue(data, "From", message.getFrom());
putValue(data, "Line-Count", message.getLineCount());
putValue(data, "Message-ID", message.getMessageID());
putValue(data, "Message-Number", message.getMessageNumber());

代码示例来源:origin: org.codelibs.robot/s2-robot

putValue(data, "Line-Count", message.getLineCount());
} catch (Exception e) {

相关文章

MimeMessage类方法