classpathx-javamail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Classpathx-javamail] folder size and null pointer


From: Chris Burdess
Subject: Re: [Classpathx-javamail] folder size and null pointer
Date: Thu, 10 May 2012 08:24:44 +0100

Thufir wrote:
> How do you know *which* messages are available?
> 
> Of course, it's possible to load all messages from a folder, but when 
> using start and end parameters, how do you know whether the parameters 
> are valid?
> 
> 
> 
> getMessages
> 
> public Message[] getMessages(int start,
>                               int end)
>              throws MessagingException
> 
>      Returns the messages in the given range (inclusive).
> 
>      Parameters:
>          start - the number of the first message
>          end - the number of the last message
> 
> http://www.gnu.org/software/classpathx/javamail/javadoc/javax/mail/Folder.html#getMessages%28int,int%29

Message numbers will be in the range 1 to folder.getMessageCount(), and
you can get the message number of a known message with
message.getMessageNumber().




reply via email to

[Prev in Thread] Current Thread [Next in Thread]