what does this :- Message msgs[] = folder.getMessages();
1 posts in topic
Flat View  Flat View

Posted By:   chirag_patel
Posted On:   Wednesday, October 2, 2002 05:26 AM

Friends Please guide me

   please tell me that what does following statement actually do ?

Message msgs[] = folder.getMessages();

does folder.getMessages() method fill the msgs[] array with all the message contents ,(i mean the whole message alongwith attachments also) gets loaded into the msgs[] array ?

If I am right , then can you please suggest me an alternative method to find out only header inforation of messages in a given folder ?

Thank You.


Re: what does this :- Message msgs[] = folder.getMessages();

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, October 2, 2002 06:49 AM

RTFJD :-) it will ease your concern. They did think of this and they did do it the right way :-)

The JavaDoc for folder.getMessages says:

....Folder implementations are expected to provide light-weight Message objects, which get filled on demand. .....

And in the JavaDoc for Message it says:

A Message object obtained from a folder is just a lightweight reference to the actual message. The Message is 'lazily' filled up (on demand) when each item is requested from the message. Note that certain folder implementations may return Message objects that are pre-filled with certain user-specified items.

About | Sitemap | Contact