Request<Void> request = createRequest(bucketName, null, null, HttpMethodName.GET);
request.addParameter("policy", null);
signRequest(request, bucketName, null);
BucketPolicy result = new BucketPolicy();
try {
ExecutionContext executionContext = new ExecutionContext(requestHandlers);
String policyText = client.execute(request, new S3StringResponseHandler(), errorResponseHandler, executionContext);
result.setPolicyText(policyText);
return result;
} catch (AmazonServiceException ase) {
/*
* If we receive an error response telling us that no policy has
* been set for this bucket, then instead of forcing the user to