dcsimg

Can someone please specify the technique of message sorting within folder according to some criteria say Header Information?

John Zukowski

Since the Message class doesn't implement the Comparable interface, you'll need to create a custom Comparator. Then, you can call Arrays.sort(arrayOfMessages, comparator).