title: Amazon s3 returns only 1000 entries for one bucket and all for another bucket (using java sdk)?
body: <p>I am using below mentioned code to get list of all file names from s3 bucket. I have two bucket in s3. For one of the bucket below code returns all the file names (more than 1000), but the same code returns only 1000 file names for another bucket. I just don't get what is happening. 
  Why same code running  for one bucket and not for other ?</p>
  
  <p>Also my bucket have hierarchy structure  folder/filename.jpg.</p>
  
  <pre><code>ObjectListing objects = s3.listObjects("bucket.new.test");
  do {
      for (S3ObjectSummary objectSummary : objects.getObjectSummaries()) {
          String key = objectSummary.getKey();
          System.out.println(key);
      }
      objects = s3.listNextBatchOfObjects(objects);
  } while (objects.isTruncated());
  </code></pre>