signRequest(request, HttpMethodName.GET, bucketName, key);
HttpRequest httpRequest = convertToHttpRequest(request, HttpMethodName.GET);
try {
S3ObjectResponseHandler responseHandler = new S3ObjectResponseHandler();
S3Object s3Object = (S3Object)client.execute(httpRequest, responseHandler, errorResponseHandler);
/*
* TODO: For now, it's easiest to set there here in the client, but
* we could push this back into the response handler with a
* little more work.
*/
s3Object.setBucketName(bucketName);
s3Object.setKey(key);
/*
* TODO: It'd be nice to check the integrity of the data was received from S3,
* but we'd have to read off the stream and buffer the contents somewhere
* in order to do that.