A convenient method to add to RosterPacket would be something like “getRosterItemCount()” which returns the number of roster items in the roster packet. Currently the “getRosterItems()” returns an iterator, so there’'s no way of knowing how many roster items there are unless iterating through all of them first.
Thanks,
Aman