@@ -129,11 +129,7 @@ public static int AliStatusCode(String error, int Default) {
129
129
return aliStatus .getOrDefault (error , Default );
130
130
}
131
131
132
- public static int NetStatusCode (String error , int Default ) {
133
- return aliStatus .getOrDefault (error , Default );
134
- }
135
-
136
- public static String getQiniuMarker (FileInfo fileInfo ) {
132
+ public static String getQiniuQosMarker (FileInfo fileInfo ) {
137
133
return getQiniuMarker (fileInfo .key );
138
134
}
139
135
@@ -153,7 +149,7 @@ public static String getbaiduBosCosMarker(BosObjectSummary obsObject) {
153
149
return obsObject .getKey ();
154
150
}
155
151
156
- public static String getUpYunMarker (String bucket , FileItem fileItem ) {
152
+ public static String getUpYunYosMarker (String bucket , FileItem fileItem ) {
157
153
if (fileItem .key .contains ("/" )) {
158
154
String convertedKey = fileItem .key .replace ("/" , "/~" );
159
155
int lastIndex = convertedKey .lastIndexOf ("~" );
@@ -186,19 +182,19 @@ public static String getTenCosMarker(String key) {
186
182
return key ;
187
183
}
188
184
189
- public static String getUpYunMarker (String username , String password , String bucket , String key ) throws SuitsException {
185
+ public static String getUpYunYosMarker (String username , String password , String bucket , String key ) throws SuitsException {
190
186
if (key == null || "" .equals (key )) return null ;
191
187
UpYunClient upYunClient = new UpYunClient (new UpYunConfig (), username , password );
192
188
try {
193
- return getUpYunMarker (bucket , upYunClient .getFileInfo (bucket , key ));
189
+ return getUpYunYosMarker (bucket , upYunClient .getFileInfo (bucket , key ));
194
190
} catch (Exception e ) {
195
191
throw new SuitsException (e , 848 );
196
192
} finally {
197
193
upYunClient = null ;
198
194
}
199
195
}
200
196
201
- public static String decodeQiniuMarker (String marker ) {
197
+ public static String decodeQiniuQosMarker (String marker ) {
202
198
String decodedMarker = new String (Base64 .decode (marker , Base64 .URL_SAFE | Base64 .NO_WRAP ));
203
199
JsonObject jsonObject = new JsonParser ().parse (decodedMarker ).getAsJsonObject ();
204
200
return jsonObject .get ("k" ).getAsString ();
@@ -216,7 +212,7 @@ public static String decodeHuaweiObsMarker(String marker) {
216
212
return marker ;
217
213
}
218
214
219
- public static String decodeUpYunMarker (String marker ) {
215
+ public static String decodeUpYunYosMarker (String marker ) {
220
216
String keyString = new String (decoder .decode (marker ));
221
217
int index = keyString .contains ("/~" ) ? keyString .indexOf ("/~" ) + 2 : keyString .indexOf ("/" ) + 1 ;
222
218
return keyString .substring (index ).replace ("(/~|/@~|/@#)" , "/" );
@@ -278,7 +274,7 @@ public static void checkBaidu(BosClient bosClient) {
278
274
bosClient .listBuckets ();
279
275
}
280
276
281
- public static Region getQiniuRegion (String regionName ) throws IOException {
277
+ public static Region getQiniuQosRegion (String regionName ) throws IOException {
282
278
if (regionName == null || "" .equals (regionName )) return Region .autoRegion ();
283
279
switch (regionName ) {
284
280
case "z0" :
@@ -305,7 +301,7 @@ public static Region getQiniuRegion(String regionName) throws IOException {
305
301
}
306
302
}
307
303
308
- public static String getQiniuRegion (String accessKey , String secretKey , String bucket ) throws SuitsException {
304
+ public static String getQiniuQosRegion (String accessKey , String secretKey , String bucket ) throws SuitsException {
309
305
try {
310
306
Auth auth = Auth .create (accessKey , secretKey );
311
307
Configuration configuration = new Configuration ();
@@ -347,6 +343,7 @@ public static String getAliOssRegion(String accessKeyId, String accessKeySecret,
347
343
}
348
344
349
345
public static String getTenCosRegion (String secretId , String secretKey , String bucket ) throws SuitsException {
346
+ LogUtils .getLogPath (LogUtils .QSUITS );
350
347
COSCredentials cred = new BasicCOSCredentials (secretId , secretKey );
351
348
ClientConfig clientConfig = new ClientConfig ();
352
349
COSClient cosClient = new COSClient (cred , clientConfig );
@@ -396,6 +393,7 @@ public static String getS3Region(String s3AccessKeyId, String s3SecretKey, Strin
396
393
}
397
394
398
395
public static String getHuaweiObsRegion (String accessKeyId , String secretKey , String bucket ) throws SuitsException {
396
+ LogUtils .getLogPath (LogUtils .QSUITS );
399
397
ObsClient obsClient = new ObsClient (accessKeyId , secretKey , "https://obs.myhuaweicloud.com" );
400
398
try {
401
399
return obsClient .getBucketLocation (bucket );
@@ -419,7 +417,7 @@ public static String getBaiduBosRegion(String accessKeyId, String secretKey, Str
419
417
420
418
private static final String lineSeparator = System .getProperty ("line.separator" );
421
419
422
- public static String upYunSign (String method , String date , String path , String userName , String password , String md5 )
420
+ public static String upYunYosSign (String method , String date , String path , String userName , String password , String md5 )
423
421
throws IOException {
424
422
StringBuilder sb = new StringBuilder ();
425
423
String sp = "&" ;
0 commit comments