Pagination
Certain API operations return lists of objects. When the number of objects in the list is large, the API will paginate the results.
The Files.com Java SDK provides multiple ways to paginate through lists of objects.
Automatic Pagination
The listAutoPaging function iterates every item, requesting each page only when the loop reaches it, so only
one page is held in memory at a time. Breaking out of the loop stops further requests.
Manual Pagination
The loadNextPage/hasNextPage functions allow for manual pagination and loading of each page into memory.
Iterating the listing itself reads only the page loaded most recently.
Load All Items
The all function starts from the first page and loads all items into memory.
Start Over
The reset function returns the same listing, ready to request its first page again with the original filters and
options. Without it, listAutoPaging continues after the page loaded most recently.