Package io.awspring.cloud.s3
Class InMemoryBufferingS3OutputStream
java.lang.Object
java.io.OutputStream
io.awspring.cloud.s3.S3OutputStream
io.awspring.cloud.s3.InMemoryBufferingS3OutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
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
-
Field Summary
Fields -
Method Summary
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write, write
-
Field Details
-
DEFAULT_BUFFER_CAPACITY
-
-
Method Details
-
write
public void write(int b) - Specified by:
write
in classOutputStream
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
-