本文整理了Java中com.amazonaws.services.s3.model.Bucket.setName()
方法的一些代码示例,展示了Bucket.setName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bucket.setName()
方法的具体详情如下:
包路径:com.amazonaws.services.s3.model.Bucket
类名称:Bucket
方法名:setName
[英]Sets the name of the bucket. All buckets in Amazon S3 share a single namespace; ensure the bucket is given a unique name.
[中]设置存储桶的名称。AmazonS3中的所有bucket共享一个名称空间;确保为bucket指定了唯一的名称。
代码示例来源:origin: aws/aws-sdk-java
@Override
protected void doEndElement(String uri, String name, String qName) {
if (in("ListAllMyBucketsResult", "Owner")) {
if (name.equals("ID")) {
bucketsOwner.setId(getText());
} else if (name.equals("DisplayName")) {
bucketsOwner.setDisplayName(getText());
}
}
else if (in("ListAllMyBucketsResult", "Buckets")) {
if (name.equals("Bucket")) {
buckets.add(currentBucket);
currentBucket = null;
}
}
else if (in("ListAllMyBucketsResult", "Buckets", "Bucket")) {
if (name.equals("Name")) {
currentBucket.setName(getText());
} else if (name.equals("CreationDate")) {
Date creationDate = DateUtils.parseISO8601Date(getText());
currentBucket.setCreationDate(creationDate);
}
}
}
}
代码示例来源:origin: aws-amplify/aws-sdk-android
@Override
protected void doEndElement(String uri, String name, String qName) {
if (in("ListAllMyBucketsResult", "Owner")) {
if (name.equals("ID")) {
bucketsOwner.setId(getText());
} else if (name.equals("DisplayName")) {
bucketsOwner.setDisplayName(getText());
}
}
else if (in("ListAllMyBucketsResult", "Buckets")) {
if (name.equals("Bucket")) {
buckets.add(currentBucket);
currentBucket = null;
}
}
else if (in("ListAllMyBucketsResult", "Buckets", "Bucket")) {
if (name.equals("Name")) {
currentBucket.setName(getText());
} else if (name.equals("CreationDate")) {
final Date creationDate = DateUtils.parseISO8601Date(getText());
currentBucket.setCreationDate(creationDate);
}
}
}
}
代码示例来源:origin: com.amazonaws/aws-android-sdk-s3
@Override
protected void doEndElement(String uri, String name, String qName) {
if (in("ListAllMyBucketsResult", "Owner")) {
if (name.equals("ID")) {
bucketsOwner.setId(getText());
} else if (name.equals("DisplayName")) {
bucketsOwner.setDisplayName(getText());
}
}
else if (in("ListAllMyBucketsResult", "Buckets")) {
if (name.equals("Bucket")) {
buckets.add(currentBucket);
currentBucket = null;
}
}
else if (in("ListAllMyBucketsResult", "Buckets", "Bucket")) {
if (name.equals("Name")) {
currentBucket.setName(getText());
} else if (name.equals("CreationDate")) {
final Date creationDate = DateUtils.parseISO8601Date(getText());
currentBucket.setCreationDate(creationDate);
}
}
}
}
代码示例来源:origin: Nextdoor/bender
@Override
protected void doEndElement(String uri, String name, String qName) {
if (in("ListAllMyBucketsResult", "Owner")) {
if (name.equals("ID")) {
bucketsOwner.setId(getText());
} else if (name.equals("DisplayName")) {
bucketsOwner.setDisplayName(getText());
}
}
else if (in("ListAllMyBucketsResult", "Buckets")) {
if (name.equals("Bucket")) {
buckets.add(currentBucket);
currentBucket = null;
}
}
else if (in("ListAllMyBucketsResult", "Buckets", "Bucket")) {
if (name.equals("Name")) {
currentBucket.setName(getText());
} else if (name.equals("CreationDate")) {
Date creationDate = DateUtils.parseISO8601Date(getText());
currentBucket.setCreationDate(creationDate);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!