public class S3OutputStreamWrapper extends OutputStream
| Constructor and Description |
|---|
S3OutputStreamWrapper(com.amazonaws.services.s3.AmazonS3Client amazonS3Client,
String bucketName,
String path,
String fileName,
Map<String,String> metaData)
Create an OutputStream Wrapper
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Whenever the output stream is closed we are going to kick the ByteArrayOutputStream off to Amazon S3.
|
void |
flush() |
void |
write(byte[] byt) |
void |
write(byte[] byt,
int off,
int len) |
void |
write(int byt) |
public S3OutputStreamWrapper(com.amazonaws.services.s3.AmazonS3Client amazonS3Client,
String bucketName,
String path,
String fileName,
Map<String,String> metaData)
throws IOException
amazonS3Client - The Amazon S3 Client which will be handling the filebucketName - The Bucket Name you are wishing to write to.path - The path where the object will livefileName - The fileName you ware wishing to write.metaData - Any meta data that is to be written along with the objectIOException - If there is an issue creating the stream, thispublic void write(int byt)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] byt)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] byt,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOException - Exception thrown from the FileOutputStreamCopyright © 2018 The Apache Software Foundation. All rights reserved.