code: private void listStorageObjectsAndPrefixes(
        String bucketName,
        String objectNamePrefix,
        String delimiter,
        boolean includeTrailingDelimiter,
        long maxResults,
        List<StorageObject> listedObjects,
        List<String> listedPrefixes)
        throws IOException {
      logger.atFine().log(
          "listStorageObjectsAndPrefixes(%s, %s, %s, %s, %d)",
          bucketName, objectNamePrefix, delimiter, includeTrailingDelimiter, maxResults);
  
      checkArgument(
          listedObjects != null && listedObjects.isEmpty(),
          "Must provide a non-null empty container for listedObjects.");
      checkArgument(
          listedPrefixes != null && listedPrefixes.isEmpty(),
          "Must provide a non-null empty container for listedPrefixes.");
  
      Storage.Objects.List listObject =
          createListRequest(
              bucketName, objectNamePrefix, delimiter, includeTrailingDelimiter, maxResults);
  
      String pageToken = null;
      do {
        if (pageToken != null) {
          logger.atFine().log("listStorageObjectsAndPrefixes: next page %s", pageToken);
          listObject.setPageToken(pageToken);
        }
        pageToken =
            listStorageObjectsAndPrefixesPage(listObject, maxResults, listedObjects, listedPrefixes);
      } while (pageToken != null
          && getMaxRemainingResults(maxResults, listedPrefixes, listedObjects) > 0);
    }
docs: Helper for both listObjectNames and listObjectInfo that executes the actual API calls to get
  paginated lists, accumulating the StorageObjects and String prefixes into the params {@code
  listedObjects} and {@code listedPrefixes}.
  
  @param bucketName bucket name
  @param objectNamePrefix object name prefix or null if all objects in the bucket are desired
  @param delimiter delimiter to use (typically "/"), otherwise null
  @param includeTrailingDelimiter whether to include prefix objects into the {@code
  listedObjects}
  @param maxResults maximum number of results to return (total of both {@code listedObjects} and
  {@code listedPrefixes}), unlimited if negative or zero
  @param listedObjects output parameter into which retrieved StorageObjects will be added
  @param listedPrefixes output parameter into which retrieved prefixes will be added