Class S3ObjectListing

java.lang.Object
com.northconcepts.datapipeline.amazons3.S3ObjectListing

public class S3ObjectListing extends Object
A backend-neutral, single page of an S3 object listing, returned by AmazonS3FileSystem.listRootFolder(String), AmazonS3FileSystem.listFolder(String, String) and AmazonS3FileSystem.nextBatch(S3ObjectListing).

It also retains the bucketName, prefix and nextContinuationToken needed to request the following page, so callers can paginate without touching any AWS SDK classes.

  • Constructor Details

  • Method Details

    • getBucketName

      public String getBucketName()
    • getPrefix

      public String getPrefix()
      Returns the key prefix (folder) that was listed or null for a bucket's root folder.
    • getObjectSummaries

      public List<S3ObjectSummary> getObjectSummaries()
      Returns the objects in this page (never null).
    • getCommonPrefixes

      public List<String> getCommonPrefixes()
      Returns the key prefixes rolled up by the file system's delimiter (never null).
    • isTruncated

      public boolean isTruncated()
      Indicates if more results (objects or common prefixes) remain; pass this listing to AmazonS3FileSystem.nextBatch(S3ObjectListing) to get the next page.
    • getNextContinuationToken

      public String getNextContinuationToken()
    • toString

      public String toString()
      Overrides:
      toString in class Object