public void testListBucket() { try { List<Bucket> buckets = s3.listBuckets(); for (Bucket b : buckets) { System.out.print("Name : " + b.getName() + " CreationDate :" + b.getCreationDate() + "\n"); } } catch (AmazonServiceException e) { System.out.print("List bucket faild, err :" + e); } } |