and the imap client probably does a similar:
for (int i=messagesIhaveRecieved;i<countMessageOnServer; ++i)
{
//blahblahblah
}
On Aug 17, 2012, at 3:41 PM, tim wrote:
> ah i see
>
> On Aug 17, 2012, at 3:34 PM, Joshua Armstrong wrote:
>
>> On 8/17/2012 2:29 PM, tim wrote:
>>> So this:
>>>
>>> /**
>>> * Method createMail creates a new <code>Mail</code>.
>>> *
>>> * @param message
>>> * @param recipient
>>> * @return Mail
>>> * @throws MessagingException
>>> */
>>> protected Mail createMail(MimeMessage message, MailAddress recipient)
>>> throws MessagingException, UnknownHostException {
>>> Collection<MailAddress> recipients = new ArrayList<MailAddress>(1);
>>> recipients.add(recipient);
>>> MailImpl mail = new MailImpl(MailImpl.getId(), getSender(),
>>> recipients, message);
>>>
>>>
>>>
>>>
>> <snip>
>>
>> Yes. The mail gets a randomized message ID from MailImpl but that's not
>> what the IMAP server uses to fetch - it uses a sequentially assigned folder
>> index.
>>
>> Here's where it actually loops through the folder to list the messages:
>>
>> // Lock the folder while processing each message
>> synchronized (getFolder())
>> {
>> messageCount = getFolder().getMessageCount();
>> for (int i = 1; i <= messageCount; i++)
>> {
>> MimeMessage message =
>> (MimeMessage) getFolder().getMessage(i);
>>
>> --
>> Joshua M. Armstrong
>> Software Engineer
>> Centurion, Inc.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]