Skip to content

Manages to upload and download files using S3 without having to cache or save entire objects in the file system

License

Notifications You must be signed in to change notification settings

dkamakin/s3-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 Stream

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).

Getting started

Maven Central

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'

Examples

  1. Creating an OutputStream
MultiPartOutputStream.builder()
                     .bucket(bucketName)
                     .key(key)
                     .client(s3Client)
                     .build();
  1. Creating an InputStream
MultiPartInputStream.builder()
                    .bucket(bucketName)
                    .key(key)
                    .client(s3Client)
                    .build();

About

Manages to upload and download files using S3 without having to cache or save entire objects in the file system

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages