ListBucketOptions opts = new ListBucketOptions( );
opts.withPrefix( prefix );
opts.afterMarker( String.valueOf( marker ) );
Future<S3Bucket> listResult = _connection.listBucket( _bucket, opts );
S3Bucket bucket = null;
try
{
bucket = listResult.get( );
}
catch ( Exception e )
{
throw new ProviderRequestException( e );
}
SortedSet<Metadata> contents = bucket.getContents( );
ListBucketResult output = new ListBucketResult( );
output.setIsTruncated( bucket.isTruncated( ) );
output.setDelimiter( bucket.getDelimiter( ) );
output.setMarker( bucket.getMarker( ) );
output.setMaxKeys( (int) bucket.getMaxKeys( ) );
output.setName( bucket.getName( ) );
output.setPrefix( bucket.getPrefix( ) );
List<ListEntry> outputContents = output.getContents( );
for ( Metadata meta : contents )
{
ListEntry entry = new ListEntry( );