七牛android下载文件时 url的拼接

String  _serverUrl="http://www.baidu.com/";

String  _filename="picture.jpg";

String mDeadLine=3600;

String SecretKey="你的secretkey";

try {

String DownloadUrl =_serverUrl+_filename + "?e=" + mDeadLine;
byte[] DownloadSign = HmacSHA1Encrypt(DownloadUrl, SecretKey);// 这个方法参见我的上传demo
String DownloadEncodedSign = UrlSafeBase64.encodeToString(DownloadSign);
String DownloadToken = AccessKey + ':'+ DownloadEncodedSign;
DownloadUrl += "&token=" + DownloadToken;
Log.e(TAG, "DownloadUrl*******:" + DownloadUrl);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

你可能感兴趣的:(七牛android下载文件时 url的拼接)