S3Object[] partialObjects = new S3Object[
(entries == null? 0 : entries.length)];
log.debug("Found " + partialObjects.length + " objects in one batch");
for (int i = 0; entries != null && i < entries.length; i++) {
ListEntry entry = entries[i];
S3Object object = new S3Object(entry.getKey());
object.setLastModifiedDate(entry.getLastModified().getTime());
object.setETag(entry.getETag());
object.setContentLength(entry.getSize());
object.setStorageClass(entry.getStorageClass().toString());
object.setOwner(convertOwner(entry.getOwner()));
partialObjects[i] = object;
// This shouldn't be necessary, but result.getNextMarker() doesn't work as expected.
priorLastKey = object.getKey();
}
objects.addAll(Arrays.asList(partialObjects));
PrefixEntry[] prefixEntries = result.getCommonPrefixes();
if (prefixEntries != null) {
log.debug("Found " + prefixEntries.length + " common prefixes in one batch");
}
for (int i = 0; prefixEntries != null && i < prefixEntries.length; i++ ) {
PrefixEntry entry = prefixEntries[i];
commonPrefixes.add(entry.getPrefix());
}
incompleteListing = result.isIsTruncated();
if (incompleteListing) {
if (result.getNextMarker() != null) {