public enum BucketNameUtils extends Enum<BucketNameUtils>
限定符和类型 | 方法和说明 |
---|---|
static boolean |
isDNSBucketName(String bucketName)
Convience method that allows the DNS rules to be altered for different SDKs.
|
static boolean |
isValidV2BucketName(String bucketName)
Returns true if the specified bucket name can be addressed using V2,
virtual host style, addressing.
|
static void |
validateBucketName(String bucketName)
Validates that the specified bucket name is valid for Amazon S3 V2 naming
(i.e.
|
static BucketNameUtils |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static BucketNameUtils[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static BucketNameUtils[] values()
for (BucketNameUtils c : BucketNameUtils.values()) System.out.println(c);
public static BucketNameUtils valueOf(String name)
name
- 要返回的枚举常量的名称。IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量NullPointerException
- 如果参数为空值public static void validateBucketName(String bucketName)
S3 bucket naming guidelines are specified in http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html? BucketRestrictions.html
bucketName
- The bucket name to validate.IllegalArgumentException
- If the specified bucket name doesn't follow Amazon S3's
guidelines.public static boolean isValidV2BucketName(String bucketName)
bucketName
- The name of the bucket to check.public static boolean isDNSBucketName(String bucketName)
Copyright © 2016. All rights reserved.