Skip to content

abperiasamy/minio-java

 
 

Repository files navigation

Minio Java Library for Amazon S3 Compatible Cloud Storage Gitter

Install from maven Build Status

<dependency>
    <groupId>io.minio</groupId>
    <artifactId>minio</artifactId>
    <version>0.2.2</version>
</dependency>

Install from gradle

dependencies {
    compile 'io.minio:minio:0.2.2'
}

Install from jars

You can download the latest jars directly from maven - Maven

Example

package hello.listbuckets;

import io.minio.MinioClient;
import io.minio.errors.ClientException;
import io.minio.messages.ListAllMyBucketsResult;
import org.xmlpull.v1.XmlPullParserException;

import java.io.IOException;

public class HelloListBuckets {
    public static void main(String[] args) throws IOException, XmlPullParserException, ClientException {
        // Set s3 endpoint, region is calculated automatically
        Client s3client = new MinioClient("https://s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY");

        // list buckets
        Iterator<Bucket> bucketList = s3Client.listBuckets();
        while (bucketList.hasNext()) {
            Bucket bucket = bucketList.next();
            System.out.println(bucket.getName());
        }
    }
}

Additional Examples

Bucket Operations

Object Operations

Contribute

Contributors Guide

About

MInimal object storage library for Java programming language

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%