public interface Bucket extends Comparable<Bucket>
You get an instance of this interface from Region, for example:
Region region = new Region.Simple(key, secret);
Bucket bucket = region.bucket("my.example.com");
for (String key : bucket.list("")) {
System.out.println(
"key: " + key + ", last modified: "
+ bucket.get(key).meta().getLastModified()
);
}| Modifier and Type | Interface and Description |
|---|---|
static class |
Bucket.Prefixed
Creates bucket with specified origin bucket and prefix.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
Checks if the bucket exists.
|
Iterable<String> |
list(String pfx)
List object names with a given prefix.
|
String |
name()
Get bucket name.
|
Ocket |
ocket(String key)
Get object.
|
Region |
region()
Get region we're in.
|
void |
remove(String key)
Delete object from bucket.
|
compareToRegion region()
String name()
boolean exists()
throws IOException
true, otherwise falseIOException - If any failure happensvoid remove(String key) throws IOException
key - Name of it in the bucketIOException - If not found or any other failureIterable<String> list(String pfx) throws IOException
pfx - Prefix to useIOException - If failsCopyright © 2012–2017 jcabi.com. All rights reserved.