Class InMemoryBufferingS3OutputStream

java.lang.Object
java.io.OutputStream
io.awspring.cloud.s3.S3OutputStream
io.awspring.cloud.s3.InMemoryBufferingS3OutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class InMemoryBufferingS3OutputStream extends S3OutputStream
S3OutputStream implementation that buffers content to an internal ByteArrayOutputStream and streams the content as a MultiPartUpload as the buffer fills up. If the buffer's capacity is never exceeded, then an ordinary PutObjectRequest is used for efficiency. This implementation is thread-safe, but makes no guarantees to prevent data from interleaving.

This stream must be closed to complete the upload.
Since:
3.0
Author:
Sam Garfinkel