List of utility methods to do Amazon S3
String | writeStreamToS3File(AWSCredentials credentials, String bucketName, String key, ByteArrayOutputStream stream, String contentType, CannedAccessControlList acl) writeStreamToS3File - Write a given Stream to a specified S3 file, returing a pre-signed URL to the file. String result = ""; AmazonS3Client conn = new AmazonS3Client(credentials); ObjectMetadata metadata = new ObjectMetadata(); metadata.setContentType(contentType); metadata.setContentLength((long) stream.toByteArray().length); ByteArrayInputStream input = new ByteArrayInputStream(stream.toByteArray()); conn.putObject(bucketName, key, (InputStream) input, metadata); conn.setObjectAcl(bucketName, key, acl); ... |