Class Aws4SignerUtils
java.lang.Object
software.amazon.awssdk.auth.signer.internal.Aws4SignerUtils
Utility methods that is used by the different AWS Signer implementations.
This class is strictly internal and is subjected to change.
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
calculateRequestContentLength
(SdkHttpFullRequest.Builder mutableRequest) Calculates the content length of a request.static String
formatDateStamp
(long timeMilli) Returns a string representation of the given date time in yyyyMMdd format.static String
formatDateStamp
(Instant instant) static String
formatTimestamp
(long timeMilli) Returns a string representation of the given date time in yyyyMMdd'T'HHmmss'Z' format.static String
formatTimestamp
(Instant instant)
-
Method Details
-
formatDateStamp
Returns a string representation of the given date time in yyyyMMdd format. The date returned is in the UTC zone. For example, given a time "1416863450581", this method returns "20141124" -
formatDateStamp
-
formatTimestamp
Returns a string representation of the given date time in yyyyMMdd'T'HHmmss'Z' format. The date returned is in the UTC zone. For example, given a time "1416863450581", this method returns "20141124T211050Z" -
formatTimestamp
-
calculateRequestContentLength
Calculates the content length of a request. If the content-length isn't in the header, the method reads the whole input stream to get the length.
-