I have implement pagination in javamail using getMessages(start ,end) method
.But this method doesn't take sort term as parameters as getSortedMessages(SortTerm term) method take ,
also getSortedMessages method doesn't take range numbers as parameters .
So how I can implement pagination and sorting both together .
I don't want to get all messages and then sort them , this will lead to bad performance in my application.
Any help please ...