MinIO Client SDK for Java
MinIO Java SDK is Simple Storage Service (aka S3) client to perform bucket and object operations to any Amazon S3 compatible object storage service.
For a complete list of APIs and examples, please take a look at the Java Client API Reference documentation.
Java 1.8 or above.
io.minio
minio
9.0.3
dependencies {
implementation("io.minio:minio:9.0.3")
}The latest JAR can be downloaded from here
This example program connects to an object storage server, makes a bucket on the server and then uploads a file to the bucket.
You need three items in order to connect to an object storage server.
| Parameters | Description |
|---|---|
| Endpoint | URL to S3 service. |
| Access Key | Access key (aka user ID) of an account in the S3 service. |
| Secret Key | Secret key (aka password) of an account in the S3 service. |
This example uses MinIO server playground https://play.min.io. Feel free to use this service for test and development.
…$ javac -cp minio-9.0.3-all.jar FileUploader.java$ java -cp minio-9.0.3-all.jar:. FileUploader
'/home/user/Photos/asiaphotos.zip' is successfully uploaded as object 'asiaphotos-2015.zip' to bucket 'asiatrip'.
$ mc ls play/asiatrip/
[2016-06-02 18:10:29 PDT] 82KiB asiaphotos-2015.zipPlease refer Contributors Guide
No open issues yet, or sync has not completed.