本文整理了Java中com.fsck.k9.mail.Message.getSize()
方法的一些代码示例,展示了Message.getSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getSize()
方法的具体详情如下:
包路径:com.fsck.k9.mail.Message
类名称:Message
方法名:getSize
暂无
代码示例来源:origin: k9mail/k-9
private Message buildSmallNewMessage() {
Message message = mock(Message.class);
when(message.olderThan(nullable(Date.class))).thenReturn(false);
when(message.getSize()).thenReturn((long) MAXIMUM_SMALL_MESSAGE_SIZE);
return message;
}
代码示例来源:origin: k9mail/k-9
private Message buildLargeNewMessage() {
Message message = mock(Message.class);
when(message.olderThan(nullable(Date.class))).thenReturn(false);
when(message.getSize()).thenReturn((long) (MAXIMUM_SMALL_MESSAGE_SIZE + 1));
return message;
}
代码示例来源:origin: k9mail/k-9
int unsizedMessages = 0;
for (Message message : messages) {
if (message.getSize() == -1) {
unsizedMessages++;
代码示例来源:origin: k9mail/k-9
ByteArrayOutputStream out;
long size = message.getSize();
if (size > Integer.MAX_VALUE) {
throw new MessagingException("message size > Integer.MAX_VALUE!");
代码示例来源:origin: k9mail/k-9
@Override
public void messageFinished(T message, int number, int ofTotal) {
try {
if (message.isSet(Flag.DELETED) || message.olderThan(earliestDate)) {
if (message.isSet(Flag.DELETED)) {
Timber.v("Newly downloaded message %s:%s:%s was marked deleted on server, " +
"skipping", accountName, folder, message.getUid());
} else {
Timber.d("Newly downloaded message %s is older than %s, skipping",
message.getUid(), earliestDate);
}
progress.incrementAndGet();
//TODO: This might be the source of poll count errors in the UI. Is todo always the same as ofTotal
listener.syncProgress(folder, progress.get(), todo);
return;
}
if (syncConfig.getMaximumAutoDownloadMessageSize() > 0 &&
message.getSize() > syncConfig.getMaximumAutoDownloadMessageSize()) {
largeMessages.add(message);
} else {
smallMessages.add(message);
}
} catch (Exception e) {
Timber.e(e, "Error while storing downloaded message.");
}
}
代码示例来源:origin: k9mail/k-9
@Override
public void messageFinished(T message, int number, int ofTotal) {
try {
if (message.isSet(Flag.DELETED) || message.olderThan(earliestDate)) {
if (message.isSet(Flag.DELETED)) {
Timber.v("Newly downloaded message %s:%s:%s was marked deleted on server, " +
"skipping", accountName, folder, message.getUid());
} else {
Timber.d("Newly downloaded message %s is older than %s, skipping",
message.getUid(), earliestDate);
}
progress.incrementAndGet();
//TODO: This might be the source of poll count errors in the UI. Is todo always the same as ofTotal
listener.syncProgress(folder, progress.get(), todo);
return;
}
if (syncConfig.getMaximumAutoDownloadMessageSize() > 0 &&
message.getSize() > syncConfig.getMaximumAutoDownloadMessageSize()) {
largeMessages.add(message);
} else {
smallMessages.add(message);
}
} catch (Exception e) {
Timber.e(e, "Error while storing downloaded message.");
}
}
代码示例来源:origin: k9mail/k-9
@Override
public void messageFinished(T message, int number, int ofTotal) {
try {
if (message.isSet(Flag.DELETED) || message.olderThan(earliestDate)) {
if (message.isSet(Flag.DELETED)) {
Timber.v("Newly downloaded message %s:%s:%s was marked deleted on server, " +
"skipping", accountName, folder, message.getUid());
} else {
Timber.d("Newly downloaded message %s is older than %s, skipping",
message.getUid(), earliestDate);
}
progress.incrementAndGet();
//TODO: This might be the source of poll count errors in the UI. Is todo always the same as ofTotal
listener.syncProgress(folder, progress.get(), todo);
return;
}
if (syncConfig.getMaximumAutoDownloadMessageSize() > 0 &&
message.getSize() > syncConfig.getMaximumAutoDownloadMessageSize()) {
largeMessages.add(message);
} else {
smallMessages.add(message);
}
} catch (Exception e) {
Timber.e(e, "Error while storing downloaded message.");
}
}
代码示例来源:origin: k9mail/k-9
|| message.getSize() < syncConfig.getMaximumAutoDownloadMessageSize()) {
completeMessage = true;
代码示例来源:origin: k9mail/k-9
|| message.getSize() < syncConfig.getMaximumAutoDownloadMessageSize()) {
completeMessage = true;
内容来源于网络,如有侵权,请联系作者删除!