This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Sorting messages in a Folder in JavaMail
 
It's not a secret anymore!