Package com.jcabi.s3.fake
Class FkBucket
- java.lang.Object
-
- com.jcabi.s3.fake.FkBucket
-
- All Implemented Interfaces:
Bucket,Comparable<Bucket>
@Immutable @Loggable(1) public final class FkBucket extends Object implements Bucket
Mock/fake bucket.- Since:
- 0.6
- Version:
- $Id: a3b0920c180560d8f6ff69121b2c9c8752111e49 $
- Author:
- Yegor Bugayenko (yegor256@gmail.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.s3.Bucket
Bucket.Prefixed
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Bucket bucket)booleanexists()Checks if the bucket exists.Iterable<String>list(String pfx)List object names with a given prefix.Stringname()Get bucket name.Ocketocket(String key)Get object.Regionregion()Get region we're in.voidremove(String key)Delete object from bucket.StringtoString()
-
-
-
Constructor Detail
-
FkBucket
public FkBucket() throws IOExceptionCtor.- Throws:
IOException- If fails- Since:
- 0.17
-
FkBucket
public FkBucket(String name) throws IOException
Ctor.- Parameters:
name- Name of the bucket- Throws:
IOException- If fails- Since:
- 0.17
-
FkBucket
public FkBucket(File file, String name)
Ctor.- Parameters:
file- Directory to keep files inname- Name of the bucket
-
FkBucket
public FkBucket(Path file, String name)
Ctor.- Parameters:
file- Directory to keep files inname- Name of the bucket- Since:
- 0.17
-
-
Method Detail
-
exists
public boolean exists()
Description copied from interface:BucketChecks if the bucket exists.
-
remove
public void remove(String key)
Description copied from interface:BucketDelete object from bucket.
-
list
public Iterable<String> list(String pfx)
Description copied from interface:BucketList object names with a given prefix.
-
compareTo
public int compareTo(Bucket bucket)
- Specified by:
compareToin interfaceComparable<Bucket>
-
-