Skip to content

Commit

Permalink
motify some demos
Browse files Browse the repository at this point in the history
  • Loading branch information
admin committed Nov 3, 2016
1 parent df88992 commit 86b6d80
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 105 deletions.
19 changes: 4 additions & 15 deletions examples/BatchDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,11 @@ public static void main(String args[]){
String SECRET_KEY = "Secret_Key";
Auth auth = Auth.create(ACCESS_KEY, SECRET_KEY);

///////////////////////指定上传的Zone的信息//////////////////
//第一种方式: 指定具体的要上传的zone
//注:该具体指定的方式和以下自动识别的方式选择其一即可
//要上传的空间(bucket)的存储区域为华东时
// Zone z = Zone.zone0();
//要上传的空间(bucket)的存储区域为华北时
// Zone z = Zone.zone1();
//要上传的空间(bucket)的存储区域为华南时
// Zone z = Zone.zone2();
Zone z = Zone.zone0();
Configuration c = new Configuration(z);

//第二种方式: 自动识别要上传的空间(bucket)的存储区域是华东、华北、华南。
Zone z = Zone.autoZone();
Configuration c = new Configuration(z);

//实例化一个BucketManager对象
BucketManager bucketManager = new BucketManager(auth,c);
//实例化一个BucketManager对象
BucketManager bucketManager = new BucketManager(auth,c);

//创建Batch类型的operations对象
BucketManager.Batch operations = new BucketManager.Batch();
Expand Down
19 changes: 4 additions & 15 deletions examples/FetchDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,11 @@ public static void main(String args[]){
String SECRET_KEY = "Secret_Key";
Auth auth = Auth.create(ACCESS_KEY, SECRET_KEY);

///////////////////////指定上传的Zone的信息//////////////////
//第一种方式: 指定具体的要上传的zone
//注:该具体指定的方式和以下自动识别的方式选择其一即可
//要上传的空间(bucket)的存储区域为华东时
// Zone z = Zone.zone0();
//要上传的空间(bucket)的存储区域为华北时
// Zone z = Zone.zone1();
//要上传的空间(bucket)的存储区域为华南时
// Zone z = Zone.zone2();
Zone z = Zone.zone0();
Configuration c = new Configuration(z);

//第二种方式: 自动识别要上传的空间(bucket)的存储区域是华东、华北、华南。
Zone z = Zone.autoZone();
Configuration c = new Configuration(z);

//实例化一个BucketManager对象
BucketManager bucketManager = new BucketManager(auth,c);
//实例化一个BucketManager对象
BucketManager bucketManager = new BucketManager(auth,c);

//文件保存的空间名和文件名
String bucket = "yourbucket";
Expand Down
19 changes: 4 additions & 15 deletions examples/ListDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,11 @@ public static void main(String args[]){
String SECRET_KEY = "Secret_Key";
Auth auth = Auth.create(ACCESS_KEY, SECRET_KEY);

///////////////////////指定上传的Zone的信息//////////////////
//第一种方式: 指定具体的要上传的zone
//注:该具体指定的方式和以下自动识别的方式选择其一即可
//要上传的空间(bucket)的存储区域为华东时
// Zone z = Zone.zone0();
//要上传的空间(bucket)的存储区域为华北时
// Zone z = Zone.zone1();
//要上传的空间(bucket)的存储区域为华南时
// Zone z = Zone.zone2();
Zone z = Zone.zone0();
Configuration c = new Configuration(z);

//第二种方式: 自动识别要上传的空间(bucket)的存储区域是华东、华北、华南。
Zone z = Zone.autoZone();
Configuration c = new Configuration(z);

//实例化一个BucketManager对象
BucketManager bucketManager = new BucketManager(auth,c);
//实例化一个BucketManager对象
BucketManager bucketManager = new BucketManager(auth,c);

//要列举文件的空间名
String bucket = "yourbucket";
Expand Down
13 changes: 1 addition & 12 deletions examples/copy.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,7 @@ public static void main(String args[]){
String SECRET_KEY = "Secret_Key";
Auth auth = Auth.create(ACCESS_KEY, SECRET_KEY);

///////////////////////指定上传的Zone的信息//////////////////
//第一种方式: 指定具体的要上传的zone
//注:该具体指定的方式和以下自动识别的方式选择其一即可
//要上传的空间(bucket)的存储区域为华东时
// Zone z = Zone.zone0();
//要上传的空间(bucket)的存储区域为华北时
// Zone z = Zone.zone1();
//要上传的空间(bucket)的存储区域为华南时
// Zone z = Zone.zone2();

//第二种方式: 自动识别要上传的空间(bucket)的存储区域是华东、华北、华南。
Zone z = Zone.autoZone();
Zone z = Zone.zone0();
Configuration c = new Configuration(z);

//实例化一个BucketManager对象
Expand Down
13 changes: 1 addition & 12 deletions examples/delete.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,7 @@ public static void main(String args[]){
String SECRET_KEY = "Secret_Key";
Auth auth = Auth.create(ACCESS_KEY, SECRET_KEY);

///////////////////////指定上传的Zone的信息//////////////////
//第一种方式: 指定具体的要上传的zone
//注:该具体指定的方式和以下自动识别的方式选择其一即可
//要上传的空间(bucket)的存储区域为华东时
// Zone z = Zone.zone0();
//要上传的空间(bucket)的存储区域为华北时
// Zone z = Zone.zone1();
//要上传的空间(bucket)的存储区域为华南时
// Zone z = Zone.zone2();

//第二种方式: 自动识别要上传的空间(bucket)的存储区域是华东、华北、华南。
Zone z = Zone.autoZone();
Zone z = Zone.zone0();
Configuration c = new Configuration(z);

//实例化一个BucketManager对象
Expand Down
13 changes: 1 addition & 12 deletions examples/fops.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,7 @@ public static void main(String[] args) throws QiniuException {
String SECRET_KEY = "Secret_Key";
Auth auth = Auth.create(ACCESS_KEY, SECRET_KEY);

///////////////////////指定上传的Zone的信息//////////////////
//第一种方式: 指定具体的要上传的zone
//注:该具体指定的方式和以下自动识别的方式选择其一即可
//要上传的空间(bucket)的存储区域为华东时
// Zone z = Zone.zone0();
//要上传的空间(bucket)的存储区域为华北时
// Zone z = Zone.zone1();
//要上传的空间(bucket)的存储区域为华南时
// Zone z = Zone.zone2();

//第二种方式: 自动识别要上传的空间(bucket)的存储区域是华东、华北、华南。
Zone z = Zone.autoZone();
Zone z = Zone.zone0();
Configuration c = new Configuration(z);

//新建一个OperationManager对象
Expand Down
13 changes: 1 addition & 12 deletions examples/move.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,7 @@ public static void main(String args[]){
String SECRET_KEY = "Secret_Key";
Auth auth = Auth.create(ACCESS_KEY, SECRET_KEY);

///////////////////////指定上传的Zone的信息//////////////////
//第一种方式: 指定具体的要上传的zone
//注:该具体指定的方式和以下自动识别的方式选择其一即可
//要上传的空间(bucket)的存储区域为华东时
// Zone z = Zone.zone0();
//要上传的空间(bucket)的存储区域为华北时
// Zone z = Zone.zone1();
//要上传的空间(bucket)的存储区域为华南时
// Zone z = Zone.zone2();

//第二种方式: 自动识别要上传的空间(bucket)的存储区域是华东、华北、华南。
Zone z = Zone.autoZone();
Zone z = Zone.zone0();
Configuration c = new Configuration(z);

//实例化一个BucketManager对象
Expand Down
13 changes: 1 addition & 12 deletions examples/stat.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,7 @@ public static void main(String args[]){
String SECRET_KEY = "Secret_Key";
Auth auth = Auth.create(ACCESS_KEY, SECRET_KEY);

///////////////////////指定上传的Zone的信息//////////////////
//第一种方式: 指定具体的要上传的zone
//注:该具体指定的方式和以下自动识别的方式选择其一即可
//要上传的空间(bucket)的存储区域为华东时
// Zone z = Zone.zone0();
//要上传的空间(bucket)的存储区域为华北时
// Zone z = Zone.zone1();
//要上传的空间(bucket)的存储区域为华南时
// Zone z = Zone.zone2();

//第二种方式: 自动识别要上传的空间(bucket)的存储区域是华东、华北、华南。
Zone z = Zone.autoZone();
Zone z = Zone.zone0();
Configuration c = new Configuration(z);

//实例化一个BucketManager对象
Expand Down

0 comments on commit 86b6d80

Please sign in to comment.