Skip to content

Commit

Permalink
0.10.16
Browse files Browse the repository at this point in the history
  • Loading branch information
xuchuan committed Dec 27, 2016
1 parent b325ba1 commit 67e38a3
Show file tree
Hide file tree
Showing 858 changed files with 4,705 additions and 25,686 deletions.
0 LICENSE.txt → LICENSE
100755 → 100644
File renamed without changes.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.baidubce</groupId>
<artifactId>bce-java-sdk</artifactId>
<version>0.10.15</version>
<version>0.10.16</version>
<name>bce-sdk-java</name>
<description>The BCE SDK for Java provides Java APIs for all of BCE services.</description>
<url>http://bce.baidu.com/sdk/index.html</url>
Expand Down
Empty file modified src/main/assembly/package.xml
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/AbstractBceClient.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/BceClientConfiguration.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/BceClientException.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/baidubce/BceConstants.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -16,5 +16,5 @@
* Common constants used by the whole SDK.
*/
public class BceConstants {
public static final String VERSION = "0.10.15";
public static final String VERSION = "0.10.16";
}
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/BceErrorResponse.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/BceResponseMetadata.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/BceServiceException.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/ErrorCode.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/Protocol.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/Region.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/auth/BceCredentials.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/auth/BceSessionCredentials.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/auth/BceV1Signer.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/auth/DefaultBceCredentials.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/auth/DefaultBceSessionCredentials.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/auth/SignOptions.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/auth/Signer.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/http/BceCloseableHttpResponse.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/http/BceHttpClient.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/http/BceHttpResponse.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/baidubce/http/DefaultRetryPolicy.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -138,13 +138,17 @@ protected boolean shouldRetry(BceClientException exception, int retriesAttempted
BceServiceException e = (BceServiceException) exception;

/*
* For 500 internal server errors and 503 service unavailable errors, we want to retry, but we need to use
* For 500 internal server errors and 503 service unavailable errors and 502 service bad gateway, we want to retry, but we need to use
* an exponential back-off strategy so that we don't overload a server with a flood of retries.
*/
if (e.getStatusCode() == HttpStatus.SC_INTERNAL_SERVER_ERROR) {
logger.debug("Retry for internal server error.");
return true;
}
if (e.getStatusCode() == HttpStatus.SC_BAD_GATEWAY) {
logger.debug("Retry for bad gateway.");
return true;
}
if (e.getStatusCode() == HttpStatus.SC_SERVICE_UNAVAILABLE) {
logger.debug("Retry for service unavailable.");
return true;
Expand Down
32 changes: 24 additions & 8 deletions src/main/java/com/baidubce/http/Headers.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -47,14 +47,16 @@ public interface Headers {

public static final String LAST_MODIFIED = "Last-Modified";

public static final String LOCATION = "Location";

public static final String RANGE = "Range";

public static final String SERVER = "Server";

public static final String TRANSFER_ENCODING = "Transfer-Encoding";

public static final String USER_AGENT = "User-Agent";


/*
* BCE Common HTTP Headers
Expand All @@ -66,22 +68,36 @@ public interface Headers {

public static final String BCE_COPY_METADATA_DIRECTIVE = "x-bce-metadata-directive";

public static final String BCE_COPY_SOURCE = "x-bce-copy-source";

public static final String BCE_COPY_SOURCE_IF_MATCH = "x-bce-copy-source-if-match";

public static final String BCE_DATE = "x-bce-date";

public static final String BCE_DEBUG_ID = "x-bce-debug-id";

public static final String BCE_PREFIX = "x-bce-";

public static final String BCE_REQUEST_ID = "x-bce-request-id";

public static final String BCE_SECURITY_TOKEN = "x-bce-security-token";

public static final String BCE_STORAGE_CLASS = "x-bce-storage-class";

public static final String BCE_USER_METADATA_PREFIX = "x-bce-meta-";

/*
* BOS HTTP Headers
*/

public static final String BCE_COPY_SOURCE = "x-bce-copy-source";

public static final String BCE_COPY_SOURCE_IF_MODIFIED_SINCE = "x-bce-copy-source-if-modified-since";

public static final String BCE_COPY_SOURCE_IF_NONE_MATCH = "x-bce-copy-source-if-none-match";

public static final String BCE_COPY_SOURCE_IF_UNMODIFIED_SINCE = "x-bce-copy-source-if-unmodified-since";

public static final String BCE_DEBUG_ID = "x-bce-debug-id";

public static final String BCE_NEXT_APPEND_OFFSET = "x-bce-next-append-offset";

public static final String BCE_OBJECT_TYPE = "x-bce-object-type";

public static final String BCE_STORAGE_CLASS = "x-bce-storage-class";

}
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/http/HttpMethodName.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/http/IdleConnectionReaper.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/http/RetryPolicy.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/http/StatusCodes.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/http/handler/BceErrorResponseHandler.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/http/handler/BceJsonResponseHandler.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/http/handler/BceMetadataResponseHandler.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/http/handler/HttpResponseHandler.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/internal/InternalRequest.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/internal/RestartableFileInputStream.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/internal/RestartableInputStream.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/internal/RestartableMultiByteArrayInputStream.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/internal/RestartableNonResettableInputStream.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/internal/RestartableResettableInputStream.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/model/AbstractBceRequest.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/model/AbstractBceResponse.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/model/GenericAccountRequest.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/baidubce/model/User.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
* Copyright 2014 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down
Loading

0 comments on commit 67e38a3

Please sign in to comment.