return new IMAPInputStream(message, sectionId, message.ignoreBodyStructureSize() ? -1 : bs.size, pk);
return new IMAPInputStream(this, sectionId, -1, pk);
return new IMAPInputStream(message, sectionId, message.ignoreBodyStructureSize() ? -1 : bs.size, pk);
return new IMAPInputStream(this, toSection("TEXT"), bs != null && !ignoreBodyStructureSize() ? bs.size : -1, pk);
return new IMAPInputStream(this, sectionId, -1, pk);
protected InputStream getContentStream() throws MessagingException { InputStream is = null; boolean pk = message.getPeek(); // acquire outisde of message cache lock // Acquire MessageCacheLock, to freeze seqnum. synchronized(message.getMessageCacheLock()) { try { IMAPProtocol p = message.getProtocol(); // Check whether this message is expunged message.checkExpunged(); if (p.isREV1() && (message.getFetchBlockSize() != -1)) return new IMAPInputStream(message, sectionId, bs.size, pk); // Else, vanila IMAP4, no partial fetch int seqnum = message.getSequenceNumber(); BODY b; if (pk) b = p.peekBody(seqnum, sectionId); else b = p.fetchBody(seqnum, sectionId); if (b != null) is = b.getByteArrayInputStream(); } catch (ConnectionException cex) { throw new FolderClosedException( message.getFolder(), cex.getMessage()); } catch (ProtocolException pex) { throw new MessagingException(pex.getMessage(), pex); }
return new IMAPInputStream(this, toSection("TEXT"), bs != null && !ignoreBodyStructureSize() ? bs.size : -1, pk);
return new IMAPInputStream(message, sectionId, message.ignoreBodyStructureSize() ? -1 : bs.size, pk);
return new IMAPInputStream(message, sectionId, message.ignoreBodyStructureSize() ? -1 : bs.size, pk);
return new IMAPInputStream(message, sectionId, message.ignoreBodyStructureSize() ? -1 : bs.size, pk);
return new IMAPInputStream(message, sectionId, message.ignoreBodyStructureSize() ? -1 : bs.size, pk);
return new IMAPInputStream(this, sectionId, -1, pk);
return new IMAPInputStream(message, sectionId, bs.size, pk);
return new IMAPInputStream(this, sectionId, -1, pk);
return new IMAPInputStream(message, sectionId, bs.size, pk);
return new IMAPInputStream(this, toSection("TEXT"), bs != null && !ignoreBodyStructureSize() ? bs.size : -1, pk);
return new IMAPInputStream(this, toSection("TEXT"), bs != null && !ignoreBodyStructureSize() ? bs.size : -1, pk);
return new IMAPInputStream(this, sectionId, -1, pk);
return new IMAPInputStream(this, toSection("TEXT"), bs != null ? bs.size : -1, pk);
return new IMAPInputStream(this, toSection("TEXT"), bs != null ? bs.size : -1, pk);