This is a wrapper over the AWS SDK v2 based on Java 8, which allows you to upload and download files using S3 without having to cache or save entire objects in the file system, as the official API suggests. The library offers InputStream and OutputStream with well-known methods for convenient work with your files. Read more in JavaDoc
The tests describe quite a lot of different cases, including integration (testcontainers, minio).
Maven:
<dependency>
<groupId>com.dkamakin</groupId>
<artifactId>s3-stream</artifactId>
<version>1.0.3</version>
</dependency>
Gradle:
implementation 'com.dkamakin:s3-stream:1.0.3'
- Creating an OutputStream
MultiPartOutputStream.builder()
.bucket(bucketName)
.key(key)
.client(s3Client)
.build();
- Creating an InputStream
MultiPartInputStream.builder()
.bucket(bucketName)
.key(key)
.client(s3Client)
.build();