// Get DfpUser from "~/dfp.properties".
DfpUser user = new DfpUser();
// Get the ContentService.
ContentServiceInterface contentService = user.getService(DfpService.V201308.CONTENT_SERVICE);
// Set defaults for page and filterStatement.
ContentPage page = new ContentPage();
Statement filterStatement = new Statement();
int offset = 0;
do {
// Create a statement to get all content.
filterStatement.setQuery("LIMIT 500 OFFSET " + offset);
// Get content by statement.
page = contentService.getContentByStatement(filterStatement);
if (page.getResults() != null) {
int i = page.getStartIndex();
for (Content content : page.getResults()) {
System.out.println(i + ") Content with ID \"" + content.getId()