public final class S3 extends Object implements S3Constants
Modifier and Type | Field and Description |
---|---|
static int |
MAX_REDIRECT |
ACL_AUTH_READ, ACL_PRIVATE, ACL_PUBLIC_READ, ACL_PUBLIC_READ_WRITE, HOST, STORAGE_EU, STORAGE_UNKNOW, STORAGE_US, STORAGE_US_WEST
Constructor and Description |
---|
S3() |
S3(String secretAccessKey,
String accessKeyId,
TimeZone tz) |
Modifier and Type | Method and Description |
---|---|
InputStream |
aclRaw(String bucketName,
String objectName) |
void |
delete(String bucketName,
String objectName) |
AccessControlPolicy |
getAccessControlPolicy(String bucketName,
String objectName) |
AccessControlPolicy |
getACP(String path) |
String |
getHost() |
S3Info |
getInfo(String path) |
InputStream |
getInputStream(String bucketName,
String objectName) |
Map<String,String> |
getMetadata(String bucketName,
String objectName) |
String |
getObjectLink(String bucketName,
String objectName,
int secondsValid) |
String |
hash() |
HTTPResponse |
head(String bucketName,
String objectName) |
Bucket[] |
listBuckets() |
InputStream |
listBucketsRaw() |
Content[] |
listContents(String bucketName,
String prefix) |
Content[] |
listContents(String bucketName,
String prefix,
String marker,
int maxKeys) |
InputStream |
listContentsRaw(String bucketName,
String prefix,
String marker,
int maxKeys) |
HttpURLConnection |
preput(String bucketName,
String objectName,
int acl,
String contentType) |
void |
put(String bucketName,
String objectName,
int acl,
Entity re) |
void |
putBuckets(String bucketName,
int acl,
int storage) |
void |
releaseCache(String path) |
void |
setAccessControlPolicy(String bucketName,
String objectName,
AccessControlPolicy acp) |
void |
setAccessKeyId(String accessKeyId) |
void |
setACP(String path,
AccessControlPolicy acp) |
void |
setHost(String host) |
void |
setInfo(String path,
S3Info info) |
void |
setSecretAccessKey(String secretAccessKey) |
static DateTime |
toDate(String strDate,
TimeZone tz) |
static int |
toIntACL(String acl) |
static int |
toIntStorage(String storage) |
static int |
toIntStorage(String storage,
int defaultValue) |
String |
toString() |
static String |
toStringACL(int acl) |
static String |
toStringStorage(int storage) |
static String |
toStringStorage(int storage,
String defaultValue) |
public static final int MAX_REDIRECT
public S3()
public InputStream listBucketsRaw() throws MalformedURLException, IOException, InvalidKeyException, NoSuchAlgorithmException
public HTTPResponse head(String bucketName, String objectName) throws MalformedURLException, IOException, InvalidKeyException, NoSuchAlgorithmException
public InputStream aclRaw(String bucketName, String objectName) throws MalformedURLException, IOException, InvalidKeyException, NoSuchAlgorithmException
public AccessControlPolicy getAccessControlPolicy(String bucketName, String objectName) throws InvalidKeyException, MalformedURLException, NoSuchAlgorithmException, IOException, SAXException
public void setAccessControlPolicy(String bucketName, String objectName, AccessControlPolicy acp) throws IOException, InvalidKeyException, NoSuchAlgorithmException, SAXException
public InputStream listContentsRaw(String bucketName, String prefix, String marker, int maxKeys) throws MalformedURLException, IOException, InvalidKeyException, NoSuchAlgorithmException
public Content[] listContents(String bucketName, String prefix) throws InvalidKeyException, MalformedURLException, NoSuchAlgorithmException, IOException, SAXException
public Content[] listContents(String bucketName, String prefix, String marker, int maxKeys) throws InvalidKeyException, MalformedURLException, NoSuchAlgorithmException, IOException, SAXException
public Bucket[] listBuckets() throws InvalidKeyException, MalformedURLException, NoSuchAlgorithmException, IOException, SAXException
public void putBuckets(String bucketName, int acl, int storage) throws IOException, InvalidKeyException, NoSuchAlgorithmException, SAXException
public void put(String bucketName, String objectName, int acl, Entity re) throws IOException, InvalidKeyException, NoSuchAlgorithmException, SAXException
public HttpURLConnection preput(String bucketName, String objectName, int acl, String contentType) throws IOException, InvalidKeyException, NoSuchAlgorithmException
public String getObjectLink(String bucketName, String objectName, int secondsValid) throws InvalidKeyException, NoSuchAlgorithmException, IOException
public InputStream getInputStream(String bucketName, String objectName) throws InvalidKeyException, NoSuchAlgorithmException, IOException, SAXException
public Map<String,String> getMetadata(String bucketName, String objectName) throws InvalidKeyException, NoSuchAlgorithmException, IOException, SAXException
public void delete(String bucketName, String objectName) throws IOException, InvalidKeyException, NoSuchAlgorithmException, SAXException
public static String toStringACL(int acl) throws S3Exception
S3Exception
public static String toStringStorage(int storage) throws S3Exception
S3Exception
public static String toStringStorage(int storage, String defaultValue)
public static int toIntACL(String acl) throws S3Exception
S3Exception
public static int toIntStorage(String storage) throws S3Exception
S3Exception
public static int toIntStorage(String storage, int defaultValue)
public void setSecretAccessKey(String secretAccessKey)
secretAccessKey
- the secretAccessKey to setpublic void setAccessKeyId(String accessKeyId)
accessKeyId
- the accessKeyId to setpublic AccessControlPolicy getACP(String path)
public void setACP(String path, AccessControlPolicy acp)
public void releaseCache(String path)
public static DateTime toDate(String strDate, TimeZone tz) throws PageException
PageException
Copyright © 2015 Lucee