
Public Member Functions | |
| AWSAuthConnection (String awsAccessKeyId, String awsSecretAccessKey, boolean isSecure, String server, int port) | |
| AWSAuthConnection (String awsAccessKeyId, String awsSecretAccessKey, boolean isSecure, String server) | |
| AWSAuthConnection (String awsAccessKeyId, String awsSecretAccessKey, boolean isSecure) | |
| AWSAuthConnection (String awsAccessKeyId, String awsSecretAccessKey) | |
| Response | createBucket (String bucket, Map headers) throws MalformedURLException, IOException |
| Response | delete (String bucket, String key, Map headers) throws MalformedURLException, IOException |
| Response | deleteBucket (String bucket, Map headers) throws MalformedURLException, IOException |
| GetResponse | get (String bucket, String key, Map headers) throws MalformedURLException, IOException |
| GetResponse | getACL (String bucket, String key, Map headers) throws MalformedURLException, IOException |
| GetResponse | getBucketACL (String bucket, Map headers) throws MalformedURLException, IOException |
| GetStreamResponse | getStream (String bucket, String key, Map headers) throws MalformedURLException, IOException |
| GetResponse | getTorrent (String bucket, String key, Map headers) throws MalformedURLException, IOException |
| ListAllMyBucketsResponse | listAllMyBuckets (Map headers) throws MalformedURLException, IOException |
| ListBucketResponse | listBucket (String bucket, String prefix, String marker, Integer maxKeys, Map headers) throws MalformedURLException, IOException |
| Response | put (String bucket, String key, S3Object object, Map headers) throws MalformedURLException, IOException |
| Response | putACL (String bucket, String key, String aclXMLDoc, Map headers) throws MalformedURLException, IOException |
| Response | putBucketACL (String bucket, String aclXMLDoc, Map headers) throws MalformedURLException, IOException |
| Response | putStream (String bucket, String key, S3StreamObject object, Map headers) throws MalformedURLException, IOException |
Static Public Member Functions | |
| static String | httpDate () |
Private Member Functions | |
| void | addAuthHeader (HttpURLConnection connection, String method, String resource) |
| void | addHeaders (HttpURLConnection connection, Map headers, String prefix) |
| void | addHeaders (HttpURLConnection connection, Map headers) |
| void | addMetadataHeaders (HttpURLConnection connection, Map metadata) |
| HttpURLConnection | makeRequest (String method, String resource, Map headers, S3Object object) throws MalformedURLException, IOException |
| HttpURLConnection | makeRequest (String method, String resource, Map headers) throws MalformedURLException, IOException |
| HttpURLConnection | makeStreamRequest (String method, String resource, Map headers, S3StreamObject object) throws MalformedURLException, IOException |
| URL | makeURL (String resource) throws MalformedURLException |
Private Attributes | |
| String | awsAccessKeyId |
| String | awsSecretAccessKey |
| boolean | isSecure |
| int | port |
| String | server |
| AWSAuthConnection | ( | String | awsAccessKeyId, | |
| String | awsSecretAccessKey | |||
| ) |
| AWSAuthConnection | ( | String | awsAccessKeyId, | |
| String | awsSecretAccessKey, | |||
| boolean | isSecure | |||
| ) |
| AWSAuthConnection | ( | String | awsAccessKeyId, | |
| String | awsSecretAccessKey, | |||
| boolean | isSecure, | |||
| String | server | |||
| ) |
| AWSAuthConnection | ( | String | awsAccessKeyId, | |
| String | awsSecretAccessKey, | |||
| boolean | isSecure, | |||
| String | server, | |||
| int | port | |||
| ) |
Create a new interface to interact with S3 with the given credential and connection parameters
| awsAccessKeyId | The your user key into AWS | |
| awsSecretAccessKey | The secret string used to generate signatures for authentication. | |
| isSecure | True if the data should be encrypted on the wire on the way to or from S3. | |
| server | Which host to connect to. Usually, this will be s3.amazonaws.com | |
| port | Which port to use. |
Add the appropriate Authorization header to the HttpURLConnection.
| connection | The HttpURLConnection to which the header will be added. | |
| method | The HTTP method to use (GET, PUT, DELETE) | |
| resource | The resource name (bucketName + "/" + key). |
| void addHeaders | ( | HttpURLConnection | connection, | |
| Map | headers, | |||
| String | prefix | |||
| ) | [private] |
Add the given headers to the HttpURLConnection with a prefix before the keys.
| connection | The HttpURLConnection to which the headers will be added. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). | |
| prefix | The string to prepend to each key before adding it to the connection. |
| void addHeaders | ( | HttpURLConnection | connection, | |
| Map | headers | |||
| ) | [private] |
Add the given headers to the HttpURLConnection.
| connection | The HttpURLConnection to which the headers will be added. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| void addMetadataHeaders | ( | HttpURLConnection | connection, | |
| Map | metadata | |||
| ) | [private] |
Add the given metadata fields to the HttpURLConnection.
| connection | The HttpURLConnection to which the headers will be added. | |
| metadata | A Map of String to List of Strings representing the s3 metadata for this resource. |
Creates a new bucket.
| bucket | The name of the bucket to create. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). | |
| metadata | A Map of String to List of Strings representing the s3 metadata for this bucket (can be null). |
| Response delete | ( | String | bucket, | |
| String | key, | |||
| Map | headers | |||
| ) | throws MalformedURLException, IOException |
Deletes an object from S3.
| bucket | The name of the bucket where the object lives. | |
| key | The name of the key to use. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
Deletes a bucket.
| bucket | The name of the bucket to delete. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| GetResponse get | ( | String | bucket, | |
| String | key, | |||
| Map | headers | |||
| ) | throws MalformedURLException, IOException |
Reads an object from S3.
| bucket | The name of the bucket where the object lives. | |
| key | The name of the key to use. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| GetResponse getACL | ( | String | bucket, | |
| String | key, | |||
| Map | headers | |||
| ) | throws MalformedURLException, IOException |
Get the ACL for a given object (or bucket, if key is null).
| bucket | The name of the bucket where the object lives. | |
| key | The name of the key to use. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| GetResponse getBucketACL | ( | String | bucket, | |
| Map | headers | |||
| ) | throws MalformedURLException, IOException |
Get the ACL for a given bucket
| bucket | The name of the bucket where the object lives. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| GetStreamResponse getStream | ( | String | bucket, | |
| String | key, | |||
| Map | headers | |||
| ) | throws MalformedURLException, IOException |
Reads an object from S3 using streaming.
| bucket | The name of the bucket where the object lives. | |
| key | The name of the key to use. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| GetResponse getTorrent | ( | String | bucket, | |
| String | key, | |||
| Map | headers | |||
| ) | throws MalformedURLException, IOException |
Reads a BitTorrent file (.torrent) for an object from S3.
| bucket | The name of the bucket where the object lives. | |
| key | The name of the key to use. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| static String httpDate | ( | ) | [static] |
Generate an rfc822 date for use in the Date HTTP header.
| ListAllMyBucketsResponse listAllMyBuckets | ( | Map | headers | ) | throws MalformedURLException, IOException |
List all the buckets created by this account.
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| ListBucketResponse listBucket | ( | String | bucket, | |
| String | prefix, | |||
| String | marker, | |||
| Integer | maxKeys, | |||
| Map | headers | |||
| ) | throws MalformedURLException, IOException |
Lists the contents of a bucket.
| bucket | The name of the bucket to create. | |
| prefix | All returned keys will start with this string (can be null). | |
| marker | All returned keys will be lexographically greater than this string (can be null). | |
| maxKeys | The maximum number of keys to return (can be null). | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| HttpURLConnection makeRequest | ( | String | method, | |
| String | resource, | |||
| Map | headers, | |||
| S3Object | object | |||
| ) | throws MalformedURLException, IOException [private] |
Make a new HttpURLConnection.
| method | The HTTP method to use (GET, PUT, DELETE) | |
| resource | The resource name (bucketName + "/" + key). | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). | |
| object | The S3Object that is to be written (can be null). |
| HttpURLConnection makeRequest | ( | String | method, | |
| String | resource, | |||
| Map | headers | |||
| ) | throws MalformedURLException, IOException [private] |
Make a new HttpURLConnection without passing an S3Object parameter.
| HttpURLConnection makeStreamRequest | ( | String | method, | |
| String | resource, | |||
| Map | headers, | |||
| S3StreamObject | object | |||
| ) | throws MalformedURLException, IOException [private] |
Make a new HttpURLConnection.
| method | The HTTP method to use (GET, PUT, DELETE) | |
| resource | The resource name (bucketName + "/" + key). | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). | |
| object | The S3StreamObject that is to be written (can be null). |
| URL makeURL | ( | String | resource | ) | throws MalformedURLException [private] |
Create a new URL object for a given resource.
| resource | The resource name (bucketName + "/" + key). |
| Response put | ( | String | bucket, | |
| String | key, | |||
| S3Object | object, | |||
| Map | headers | |||
| ) | throws MalformedURLException, IOException |
Writes an object to S3.
| bucket | The name of the bucket to which the object will be added. | |
| key | The name of the key to use. | |
| object | An S3Object containing the data to write. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| Response putACL | ( | String | bucket, | |
| String | key, | |||
| String | aclXMLDoc, | |||
| Map | headers | |||
| ) | throws MalformedURLException, IOException |
Write a new ACL for a given object
| aclXMLDoc | The xml representation of the ACL as a String | |
| bucket | The name of the bucket where the object lives. | |
| key | The name of the key to use. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| Response putBucketACL | ( | String | bucket, | |
| String | aclXMLDoc, | |||
| Map | headers | |||
| ) | throws MalformedURLException, IOException |
Write a new ACL for a given bucket
| aclXMLDoc | The xml representation of the ACL as a String | |
| bucket | The name of the bucket where the object lives. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
| Response putStream | ( | String | bucket, | |
| String | key, | |||
| S3StreamObject | object, | |||
| Map | headers | |||
| ) | throws MalformedURLException, IOException |
Writes an object to S3.
| bucket | The name of the bucket to which the object will be added. | |
| key | The name of the key to use. | |
| object | An S3StreamObject containing the data stream to write. | |
| headers | A Map of String to List of Strings representing the http headers to pass (can be null). |
String awsAccessKeyId [private] |
String awsSecretAccessKey [private] |
boolean isSecure [private] |
int port [private] |
1.5.8