Package com.amazonaws.services.s3
Class AmazonS3URI
java.lang.Object
com.amazonaws.services.s3.AmazonS3URI
A URI wrapper that can parse out information about an S3 URI.
-
Constructor Summary
ConstructorsConstructorDescriptionAmazonS3URI
(String str) Creates a new AmazonS3URI by parsing the given string.AmazonS3URI
(String str, boolean urlEncode) Creates a new AmazonS3URI by parsing the given string.AmazonS3URI
(URI uri) Creates a new AmazonS3URI by wrapping the givenURI
. -
Method Summary
-
Constructor Details
-
AmazonS3URI
Creates a new AmazonS3URI by parsing the given string. String will be URL encoded before generating the URI.- Parameters:
str
- the URI to parse.
-
AmazonS3URI
Creates a new AmazonS3URI by parsing the given string. String will optionally be URL encoded before generating the URI. URL encoding is recommended if you work with bucket names or object keys with special characters. This can be disabled if you pre-encode URI strings before passing them to this class.- Parameters:
str
- the URI to parse.urlEncode
- true if string should be URL encoded
-
AmazonS3URI
Creates a new AmazonS3URI by wrapping the givenURI
.- Parameters:
uri
- the URI to wrap
-
-
Method Details
-
getURI
- Returns:
- the S3 URI being parsed
-
isPathStyle
public boolean isPathStyle()- Returns:
- true if the URI contains the bucket in the path, false if it contains the bucket in the authority
-
getBucket
- Returns:
- the bucket name parsed from the URI (or null if no bucket specified)
-
getKey
- Returns:
- the key parsed from the URI (or null if no key specified)
-
getVersionId
- Returns:
- the version id parsed from the URI (or null if no version specified)
-
getRegion
- Returns:
- the region parsed from the URI (or null if no region specified)
-
toString
-
equals
-
hashCode
public int hashCode()
-