Class DownloadUrl


  • public class DownloadUrl
    extends java.lang.Object
    Based on the IBM Cloud Documentation
    • Constructor Summary

      Constructors 
      Constructor Description
      DownloadUrl​(java.lang.String server, java.lang.String region, java.lang.String bucketName, java.lang.String cosBucketPathPrefix, java.lang.String objectKey, java.lang.String accessKey, java.lang.String secretKey, boolean presigned, S3HostStyle hostStyle)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] createSignatureKey​(java.lang.String key, java.lang.String datestamp, java.lang.String region, java.lang.String service)  
      java.lang.String getSignedUrl()  
      java.lang.String getUnsignedUrl()  
      java.lang.String getUrl()  
      byte[] hash​(byte[] key, java.lang.String msg)  
      java.lang.String hashHex​(java.lang.String msg)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DownloadUrl

        public DownloadUrl​(java.lang.String server,
                           java.lang.String region,
                           java.lang.String bucketName,
                           java.lang.String cosBucketPathPrefix,
                           java.lang.String objectKey,
                           java.lang.String accessKey,
                           java.lang.String secretKey,
                           boolean presigned,
                           S3HostStyle hostStyle)
    • Method Detail

      • getUrl

        public java.lang.String getUrl()
      • getUnsignedUrl

        public java.lang.String getUnsignedUrl()
      • getSignedUrl

        public java.lang.String getSignedUrl()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • hash

        public byte[] hash​(byte[] key,
                           java.lang.String msg)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • hashHex

        public java.lang.String hashHex​(java.lang.String msg)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createSignatureKey

        public byte[] createSignatureKey​(java.lang.String key,
                                         java.lang.String datestamp,
                                         java.lang.String region,
                                         java.lang.String service)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception