public class S3Bucket extends StorageBucket
Modifier and Type | Field | Description |
---|---|---|
static String |
LOCATION_ASIA_PACIFIC |
Alias of
LOCATION_ASIA_PACIFIC_SOUTHEAST |
static String |
LOCATION_ASIA_PACIFIC_NORTHEAST |
|
static String |
LOCATION_ASIA_PACIFIC_SINGAPORE |
Alias of
LOCATION_ASIA_PACIFIC_SOUTHEAST |
static String |
LOCATION_ASIA_PACIFIC_SOUTHEAST |
|
static String |
LOCATION_ASIA_PACIFIC_TOKYO |
Alias of
LOCATION_ASIA_PACIFIC_NORTHEAST |
static String |
LOCATION_EUROPE |
|
static String |
LOCATION_US |
|
static String |
LOCATION_US_STANDARD |
|
static String |
LOCATION_US_WEST |
METADATA_HEADER_CONTENT_DISPOSITION, METADATA_HEADER_CONTENT_ENCODING, METADATA_HEADER_CONTENT_LANGUAGE, METADATA_HEADER_CONTENT_LENGTH, METADATA_HEADER_CONTENT_MD5, METADATA_HEADER_CONTENT_TYPE, METADATA_HEADER_CREATION_DATE, METADATA_HEADER_DATE, METADATA_HEADER_ETAG, METADATA_HEADER_LAST_MODIFIED_DATE
Constructor | Description |
---|---|
S3Bucket() |
Create a bucket without any name or location specified
|
S3Bucket(String name) |
Create a bucket with a name.
|
S3Bucket(String name,
String location) |
Create a bucket with a name and a location.
|
Modifier and Type | Method | Description |
---|---|---|
static S3Bucket[] |
cast(StorageBucket[] buckets) |
|
String |
getLocation() |
|
boolean |
isLocationKnown() |
|
boolean |
isRequesterPays() |
Return the Requester Pays status of this bucket, if it is known.
|
boolean |
isRequesterPaysKnown() |
|
void |
setLocation(String location) |
Set's the bucket's location.
|
void |
setRequesterPays(boolean requesterPays) |
Set's the bucket's Requester Pays Configuration setting.
|
String |
toString() |
addAllMetadata, addMetadata, addMetadata, addMetadata, containsMetadata, getMetadata, getMetadataMap, getName, getOwner, removeMetadata, replaceAllMetadata, setName, setOwner
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAcl, getCreationDate, setAcl, setCreationDate
public static final String LOCATION_US
public static final String LOCATION_US_STANDARD
public static final String LOCATION_US_WEST
public static final String LOCATION_EUROPE
public static final String LOCATION_ASIA_PACIFIC_SOUTHEAST
public static final String LOCATION_ASIA_PACIFIC
LOCATION_ASIA_PACIFIC_SOUTHEAST
public static final String LOCATION_ASIA_PACIFIC_SINGAPORE
LOCATION_ASIA_PACIFIC_SOUTHEAST
public static final String LOCATION_ASIA_PACIFIC_NORTHEAST
public static final String LOCATION_ASIA_PACIFIC_TOKYO
LOCATION_ASIA_PACIFIC_NORTHEAST
public S3Bucket()
public S3Bucket(String name)
name
- the name for the bucketpublic S3Bucket(String name, String location)
name
- the name for the bucketlocation
- A string representing the location. Legal values include
LOCATION_US
and null (which are equivalent), or
LOCATION_EUROPE
.public String toString()
toString
in class StorageBucket
public void setLocation(String location)
location
- A string representing the location. Legal values include
LOCATION_US
and null (which are equivalent), or
LOCATION_EUROPE
.public boolean isLocationKnown()
public String getLocation()
public void setRequesterPays(boolean requesterPays)
requesterPays
- true if the bucket is configured for Requester Pays, false if it is
configured for Owner pays.public boolean isRequesterPaysKnown()
public boolean isRequesterPays()
WARNING:
Before you use this method, always check with the isRequesterPaysKnown
method to ensure that the Requester Pays status has been set, otherwise
the result of this method is meaningless.
public static S3Bucket[] cast(StorageBucket[] buckets)