@@ -0,0 +1,1939 @@
+package com.qikemi.packages.junit.alibaba.aliyun.oss;%0D%0A%0D%0Aimport java.io.File;%0D%0Aimport java.io.FileInputStream;%0D%0Aimport java.io.FileNotFoundException;%0D%0Aimport java.io.IOException;%0D%0Aimport java.io.InputStream;%0D%0A%0D%0Aimport org.junit.Test;%0D%0A%0D%0Aimport com.aliyun.openservices.oss.OSSClient;%0D%0Aimport com.aliyun.openservices.oss.model.Bucket;%0D%0Aimport com.aliyun.openservices.oss.model.ObjectListing;%0D%0Aimport com.aliyun.openservices.oss.model.PutObjectResult;%0D%0Aimport com.qikemi.packages.alibaba.aliyun.oss.BucketService;%0D%0Aimport com.qikemi.packages.alibaba.aliyun.oss.OSSClientFactory;%0D%0Aimport com.qikemi.packages.alibaba.aliyun.oss.ObjectService;%0D%0A%0D%0Apublic class OSSJunit %7B%0D%0A%0D%0A%09@Test%0D%0A%09public void t1()%7B%0D%0A%09%09OSSClient client = OSSClientFactory.createOSSClient();%0D%0A%09%09%0D%0A%09%09Bucket bucket = BucketService.create(client, %22bucketmy-bucket-nameamesdfswers%22);%0D%0A%09%09%0D%0A//%09%09try %7B%0D%0A//%09%09%09PutObjectResult result = ObjectService.putObject(client, bucket.getName(), %22jar/mysql-connector-java-5.1.33.jar%22, %22D://mysql-connector-java-5.1.33.jar%22);%0D%0A%09%09%09// 4F472D3ADF434264A7DDD2C8EE2B480A%0D%0A%09%09%09// 4F472D3ADF434264A7DDD2C8EE2B480A%0D%0A//%09%09%09System.out.println(result.getETag());%0D%0A//%09%09%7D catch (FileNotFoundException e) %7B%0D%0A//%09%09%7D%0D%0A//%09%09ObjectListing listObject = ObjectService.listObject(client, %22bucketmy-bucket-nameamesdfswers%22, null, %22jar%22);%0D%0A%09%09%0D%0A//%09%09try %7B%0D%0A//%09%09%09ObjectService.getObject(client, %22bucketmy-bucket-nameamesdfswers%22, %22mysql-connector-java-5.1.33.jar%22);%0D%0A//%09%09%09%0D%0A//%09%09%7D catch (IOException e) %7B%0D%0A//%09%09%09e.printStackTrace();%0D%0A//%09%09%7D%0D%0A%09%09%0D%0A%09%09String path = %22D://mysql-connector-java-5.1.33.jar%22;%0D%0A%09%09try %7B%0D%0A%09%09%09InputStream inputStream = new FileInputStream(new File(path));%0D%0A%09%09%09PutObjectResult result = ObjectService.putObject(client, bucket.getName(), %22jar1/mysql-connector-java-5.1.33.jar%22, inputStream);%0D%0A%09%09%09System.out.println(result.getETag());%0D%0A%09%09%09%0D%0A%09%09%7D catch (FileNotFoundException e) %7B%0D%0A%09%09%7D catch (NumberFormatException e) %7B%0D%0A%09%09%7D catch (IOException e) %7B%0D%0A%09%09%7D%0D%0A%09%09%0D%0A%09%7D%0D%0A%09%0D%0A%7D

add alibaba oss junit