2727 */
2828public class BucketDemo {
2929 // 创建bucket
30- public static void CreateBucketDemo () {
30+ public static void createBucketDemo () {
3131 // 1 初始化用户身份信息(appid, secretId, secretKey)
3232 COSCredentials cred = new BasicCOSCredentials ("AKIDXXXXXXXX" , "1A2Z3YYYYYYYYYY" );
3333 // 2 设置bucket的区域, COS地域的简称请参照 https://www.qcloud.com/document/product/436/6224
@@ -47,7 +47,7 @@ public static void CreateBucketDemo() {
4747 }
4848
4949 // 开启 bucket 版本控制
50- public static void SetBucketVersioning () {
50+ public static void setBucketVersioning () {
5151 // 1 初始化用户身份信息(appid, secretId, secretKey)
5252 COSCredentials cred = new BasicCOSCredentials ("AKIDXXXXXXXX" , "1A2Z3YYYYYYYYYY" );
5353 // 2 设置bucket的区域, COS地域的简称请参照 https://www.qcloud.com/document/product/436/6224
@@ -68,7 +68,7 @@ public static void SetBucketVersioning() {
6868 }
6969
7070 // 开启日志存储
71- public static void SetBucketLogging () {
71+ public static void setBucketLogging () {
7272 // 1 初始化用户身份信息(appid, secretId, secretKey)
7373 COSCredentials cred = new BasicCOSCredentials ("AKIDXXXXXXXX" , "1A2Z3YYYYYYYYYY" );
7474 // 2 设置bucket的区域, COS地域的简称请参照 https://www.qcloud.com/document/product/436/6224
@@ -89,7 +89,7 @@ public static void SetBucketLogging() {
8989 }
9090
9191 // 使用 bucket tag
92- public static void SetGetDeleteBucketTagging () {
92+ public static void setGetDeleteBucketTagging () {
9393 // 1 初始化用户身份信息(secretId, secretKey)
9494 COSCredentials cred = new BasicCOSCredentials ("AKIDXXXXXXXX" , "1A2Z3YYYYYYYYYY" );
9595 // 2 设置bucket的区域, COS地域的简称请参照 https://www.qcloud.com/document/product/436/6224
@@ -114,7 +114,7 @@ public static void SetGetDeleteBucketTagging() {
114114 }
115115
116116 // 删除bucket, 只用于空bucket, 含有数据的bucket需要在删除前清空删除。
117- public static void DeleteBucketDemo () {
117+ public static void deleteBucketDemo () {
118118 // 1 初始化用户身份信息(appid, secretId, secretKey)
119119 COSCredentials cred = new BasicCOSCredentials ("AKIDXXXXXXXX" , "1A2Z3YYYYYYYYYY" );
120120 // 2 设置bucket的区域, COS地域的简称请参照 https://www.qcloud.com/document/product/436/6224
@@ -131,7 +131,7 @@ public static void DeleteBucketDemo() {
131131 }
132132
133133 // 查询bucket是否存在
134- public static void JudgeBucketExistDemo () {
134+ public static void judgeBucketExistDemo () {
135135 // 1 初始化用户身份信息(appid, secretId, secretKey)
136136 COSCredentials cred = new BasicCOSCredentials ("AKIDXXXXXXXX" , "1A2Z3YYYYYYYYYY" );
137137 // 2 设置bucket的区域, COS地域的简称请参照 https://www.qcloud.com/document/product/436/6224
@@ -147,7 +147,7 @@ public static void JudgeBucketExistDemo() {
147147 cosclient .shutdown ();
148148 }
149149
150- public static void ListBuckets () {
150+ public static void listBuckets () {
151151 // 1 初始化用户身份信息(appid, secretId, secretKey)
152152 COSCredentials cred = new BasicCOSCredentials ("AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" , "****************************" );
153153 // 2 设置bucket的区域, COS地域的简称请参照 https://www.qcloud.com/document/product/436/6224
@@ -167,7 +167,7 @@ public static void ListBuckets() {
167167 }
168168
169169 //创多AZ桶
170- public static void CreateMAZBucketDemo () {
170+ public static void createMAZBucketDemo () {
171171 // 1 初始化用户身份信息(appid, secretId, secretKey)
172172 COSCredentials cred = new BasicCOSCredentials ("AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" , "****************************" );
173173 // 2 设置bucket的区域, COS地域的简称请参照 https://www.qcloud.com/document/product/436/6224
@@ -189,6 +189,6 @@ public static void CreateMAZBucketDemo() {
189189 }
190190 }
191191 public static void main (String [] args ) {
192- ListBuckets ();
192+ listBuckets ();
193193 }
194194}
0 commit comments