Class Aws4SignerUtils
- java.lang.Object
-
- software.amazon.awssdk.auth.signer.internal.Aws4SignerUtils
-
public final class Aws4SignerUtils extends Object
Utility methods that is used by the different AWS Signer implementations. This class is strictly internal and is subjected to change.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
formatDateStamp
public static String formatDateStamp(long timeMilli)
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"
-
formatTimestamp
public static String formatTimestamp(long timeMilli)
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"
-
calculateRequestContentLength
public static long calculateRequestContentLength(SdkHttpFullRequest.Builder mutableRequest)
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.
-
-