code: private AccessControlList getAcl(String bucketName, String key, String versionId,
              boolean isRequesterPays, AmazonWebServiceRequest originalRequest) {
          if (originalRequest == null) originalRequest = new GenericBucketRequest(bucketName);
  
          Request<AmazonWebServiceRequest> request = createRequest(bucketName, key, originalRequest, HttpMethodName.GET);
  
          if (bucketName != null && key != null) {
              request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetObjectAcl");
          } else if (bucketName != null) {
              request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetBucketAcl");
          }
  
          request.addParameter("acl", null);
          if (versionId != null) {
              request.addParameter("versionId", versionId);
          }
          populateRequesterPaysHeader(request, isRequesterPays);
  
          @SuppressWarnings("unchecked")
          ResponseHeaderHandlerChain<AccessControlList> responseHandler = new ResponseHeaderHandlerChain<AccessControlList>(
                  new Unmarshallers.AccessControlListUnmarshaller(),
                  new S3RequesterChargedHeaderHandler<AccessControlList>());
  
          return invoke(request, responseHandler, bucketName, key);
      }
docs: <p>
  Gets the Amazon S3 {@link AccessControlList} (ACL) for the specified resource.
  (bucket if only the bucketName parameter is specified, otherwise the object with the
  specified key in the bucket).
  </p>
  
  @param bucketName
  The name of the bucket whose ACL should be returned if the key
  parameter is not specified, otherwise the bucket containing
  the specified key.
  @param key
  The object key whose ACL should be retrieve. If not specified,
  the bucket's ACL is returned.
  @param versionId
  The version ID of the object version whose ACL is being
  retrieved.
  @param originalRequest
  The original, user facing request object.
  
  @return The S3 ACL for the specified resource.