Releases: jcabi/jcabi-s3
APT instead of MD
See #8
Bug fixes
com.jcabi.s3.retry package
com.jcabi.s3.retry
package added, with classes that retry a few times before throwing IOException
-- highly recommended to use in production
Custom toString()
This versions adds custom implementation of toString()
methods, also fixes site documentation
Ocket.exists()
This version adds method exists()
into Ocket
interface. The method checks S3 object existence. It is recommended to use it before calling any other methods, in order to avoid IOException
. For example:
Region region = new Region.Simple(key, secret);
Bucket bucket = region.bucket("example.com");
Ocket ocket = bucket.ocket("foo/README.txt");
String text;
if (ocket.exists()) {
text = new Ocket.Text(ocket).read();
} else {
text = "";
}
Besides that, this version makes Ocket
and Bucket
extend Comparable
.
Bucket.list()
This version introduced a new method list(String)
in Bucket
interface. It lists ockets in a bucket and returns their keys, which can be used in Bucket#get(String)
later. For example:
Bucket bucket = region.bucket("my.example.com");
Collection<String> keys = bucket.list("test/");
String first = keys.iterator().next();
Ocket ocket = bucket.ocket(first);
Ocket.Text.write() with content type
In this version method write()
in Ocket.Text
accepts content type.
First stable version
First version, which enables reading and writing of S3 objects (we call them "ockets" to avoid collisions with Java Object
type), for example:
import com.jcabi.s3.Bucket;
import com.jcabi.s3.Ocket;
import com.jcabi.s3.Region;
public class Main {
public static void main(String[] args) {
Region region = new Region.Simple("key", "secret");
Bucket bucket = region.bucket("my.example.com");
Ocket ocket = bucket.ocket("test.txt");
String content = new Ocket.Plain(ocket).read();
new Ocket.Plain(ocket).write("hello, world!");
}
}