com.amazonaws.services.s3
Class AmazonS3URI

java.lang.Object
  extended by com.amazonaws.services.s3.AmazonS3URI

public class AmazonS3URI
extends java.lang.Object

A URI wrapper that can parse out information about an S3 URI.


Constructor Summary
AmazonS3URI(java.lang.String str)
          Creates a new AmazonS3URI by parsing the given string.
AmazonS3URI(java.net.URI uri)
          Creates a new AmazonS3URI by wrapping the given URI.
 
Method Summary
 java.lang.String getBucket()
           
 java.lang.String getKey()
           
 java.lang.String getRegion()
           
 java.net.URI getURI()
           
 boolean isPathStyle()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AmazonS3URI

public AmazonS3URI(java.lang.String str)
Creates a new AmazonS3URI by parsing the given string.

Parameters:
str - the URI to parse.

AmazonS3URI

public AmazonS3URI(java.net.URI uri)
Creates a new AmazonS3URI by wrapping the given URI.

Parameters:
uri - the URI to wrap
Method Detail

getURI

public java.net.URI 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

public java.lang.String getBucket()
Returns:
the bucket name parsed from the URI (or null if no bucket specified)

getKey

public java.lang.String getKey()
Returns:
the key parsed from the URI (or null if no key specified)

getRegion

public java.lang.String getRegion()
Returns:
the region parsed from the URI (or null if no region specified)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.