forked from Fusion-Shopping-App/Addresses
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSample S3 SDK.java
38 lines (28 loc) · 1.29 KB
/
Sample S3 SDK.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.amazonaws.samples2;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3Client;
import com.amazonaws.services.s3.model.Bucket;
import com.amazonaws.services.s3.model.GetObjectRequest;
import com.amazonaws.services.s3.model.ListObjectsRequest;
import com.amazonaws.services.s3.model.ObjectListing;
import com.amazonaws.services.s3.model.PutObjectRequest;
import com.amazonaws.services.s3.model.S3Object;
import com.amazonaws.services.s3.model.S3ObjectSummary;
public class S3Sdk2 {
@Value("${app.awsServices.buckName1}")
private String bucket1;
@Value("${app.awsServices.buckName2}")
private String bucket2;
public void Foo() {
AmazonS3.completeMultipartUpload(bucket1);
// AmazonS3EncryptionClient.download(bucket2);
}
public void Foo2() {
String inpData = (String)AmazonS3Client.getObject(bucket2,"Key");
java.sql.ResultSet rsLookUp = openrs( stat1, "SELECT " + fName + " FROM " + table + " WHERE " + inpData
}
public java.sql.ResultSet openrs(java.sql.Statement stat, String sql) throws java.sql.SQLException {
java.sql.ResultSet rs = stat.executeQuery(sql);
return (rs);
}
}