@NotThreadSafe public class S3AOutputStream extends OutputStream
close()
method is called. The data
transfer is done using a TransferManager
which manages the upload threads and handles
multipart upload.Constructor and Description |
---|
S3AOutputStream(String bucketName,
String key,
com.amazonaws.services.s3.transfer.TransferManager manager,
List<String> tmpDirs,
boolean sseEnabled)
Constructs a new stream for writing a file.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
protected String |
getUploadPath() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public S3AOutputStream(String bucketName, String key, com.amazonaws.services.s3.transfer.TransferManager manager, List<String> tmpDirs, boolean sseEnabled) throws IOException
bucketName
- the name of the bucketkey
- the key of the filemanager
- the transfer manager to upload the file withtmpDirs
- a list of temporary directoriessseEnabled
- whether or not server side encryption is enabledIOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
protected String getUploadPath()
Copyright © 2023. All Rights Reserved.