public enum BucketNameUtils extends Enum<BucketNameUtils>
Modifier and Type | Method and Description |
---|---|
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)
Returns the enum constant of this type with the specified name.
|
static BucketNameUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static BucketNameUtils[] values()
for (BucketNameUtils c : BucketNameUtils.values()) System.out.println(c);
public static BucketNameUtils valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic 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.IllegalBucketNameException
- 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 © 2022. All rights reserved.