public static String getSignedURLWithCannedPolicy(final Protocol protocol,
                                            final String distributionDomain,
                                            final File privateKeyFile,
                                            final String s3ObjectKey,
                                            final String keyPairId,
                                            final Date dateLessThan)
            throws InvalidKeySpecException, IOException {
        final String resourcePath = generateResourcePath(protocol, distributionDomain, s3ObjectKey);
        PrivateKey privateKey = loadPrivateKey(privateKeyFile);
        return getSignedURLWithCannedPolicy(resourcePath, keyPairId, privateKey, dateLessThan);
    }
Returns a signed URL with a canned policy that grants universal access to
private content until a given date.
For more information, see <a href=
"http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls-overview.html"
>Overview of Signed URLs</a>.

@param protocol
           The protocol of the URL
@param distributionDomain
           The domain name of the distribution
@param s3ObjectKey
           The s3 key of the object, or the name of the stream for rtmp
@param privateKeyFile
           The private key file. RSA private key (.pem) and pkcs8 (.der)
           files are supported.
@param keyPairId
           The key pair id corresponding to the private key file given
@param dateLessThan
           The expiration date of the signed URL in UTC
@return The signed URL.
aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/CloudFrontUrlSigner.java