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 Details

    • 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"
    • formatDateStamp

      public static String formatDateStamp(Instant instant)
    • 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"
    • formatTimestamp

      public static String formatTimestamp(Instant instant)
    • 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.