optimized object list

This commit is contained in:
Page Asgardius 2022-10-12 12:45:10 -07:00
parent 3a0dd2c461
commit 7bf2e471fd
2 changed files with 12 additions and 16 deletions

View file

@ -225,14 +225,12 @@ public class BucketSelect extends AppCompatActivity {
ObjectListing result = s3client.listObjects(orequest);
ArrayList<String> objectl = new ArrayList<String>();
List<S3ObjectSummary> objects = result.getObjectSummaries();
boolean nextbatch = false;
while (result.isTruncated() || !nextbatch) {
if (nextbatch) {
result = s3client.listNextBatchOfObjects (result);
objects = result.getObjectSummaries();
} else {
nextbatch = true;
}
for (S3ObjectSummary os : objects) {
objectl.add(os.getKey());
}
while (result.isTruncated()) {
result = s3client.listNextBatchOfObjects (result);
objects = result.getObjectSummaries();
for (S3ObjectSummary os : objects) {
objectl.add(os.getKey());

View file

@ -546,14 +546,12 @@ public class ObjectSelect extends AppCompatActivity {
ObjectListing result = s3client.listObjects(orequest);
ArrayList<String> objectl = new ArrayList<String>();
List<S3ObjectSummary> objects = result.getObjectSummaries();
boolean nextbatch = false;
while (result.isTruncated() || !nextbatch) {
if (nextbatch) {
result = s3client.listNextBatchOfObjects (result);
objects = result.getObjectSummaries();
} else {
nextbatch = true;
}
for (S3ObjectSummary os : objects) {
objectl.add(os.getKey());
}
while (result.isTruncated()) {
result = s3client.listNextBatchOfObjects (result);
objects = result.getObjectSummaries();
for (S3ObjectSummary os : objects) {
objectl.add(os.getKey());