aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Sorting messages in a Folder in JavaMail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Sorting messages in a Folder in JavaMail" Watch "Sorting messages in a Folder in JavaMail" New topic
Author

Sorting messages in a Folder in JavaMail

Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
Dear all,

As the javax.mail.Folder class doesnt have a sort method, the option to sort messages in any folder using Javamail is by using the Comparator.

Is there any other workaround code for achieving the same?

Rgds,

Seetesh
Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
Any one?

Without using Collection.sort or using Comparator

Rgds,

Seetesh
Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
I have fetched all messages in an arraylist and then sorted the same using comparator.

Any other way of sorting an Inbox folder directly.

Rgds,

Seetesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sorting messages in a Folder in JavaMail