optimized object list
This commit is contained in:
parent
3a0dd2c461
commit
7bf2e471fd
2 changed files with 12 additions and 16 deletions
|
@ -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());
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in a new issue