Class Uri

java.lang.Object
software.amazon.awssdk.crt.io.Uri

public class Uri extends Object
Wrapper around an http URI
  • Constructor Details

    • Uri

      public Uri()
  • Method Details

    • appendEncodingUriPath

      public static String appendEncodingUriPath(String encoded, String path)
      Returns a concatenation of an encoded base, and the URI path encoding of a string. This is the modified version of rfc3986 used by sigv4 signing.
      Parameters:
      encoded - The encoded original path.
      path - The path to be encoded and appended to the original path
      Returns:
      concatenation
    • encodeUriPath

      public static String encodeUriPath(String path)
      Returns the URI path encoding of a string. This is the modified version of rfc3986 used by sigv4 signing.
      Parameters:
      path - The path to be encoded
      Returns:
      encoded path
    • appendEncodingUriParam

      public static String appendEncodingUriParam(String encoded, String param)
      Returns a concatenation of an encoded base, and the URI query param encoding (passthrough alnum + '-' '_' '~' '.') of a UTF-8 string. For example, reading "a b_c" would write "a%20b_c".
      Parameters:
      encoded - The encoded original param.
      param - The param to be encoded and appended to the original param
      Returns:
      concatenation
    • encodeUriParam

      public static String encodeUriParam(String param)
      Returns the URI query param encoding (passthrough alnum + '-' '_' '~' '.') of a UTF-8 string. For example, reading "a b_c" would write "a%20b_c".
      Parameters:
      param - The param to be encoded and appended to the original param
      Returns:
      encoded param
    • appendDecodingUri

      public static String appendDecodingUri(String base, String encoded)
      Returns a concatenation of a decoded base, and the URI decoding of a UTF-8 string, replacing %xx escapes by their single byte equivalent. For example, reading "a%20b_c" would write "a b_c".
      Parameters:
      base - The decoded base URI.
      encoded - The encoded URI to be decoded and appended to the base URI.
      Returns:
      concatenation
    • decodeUri

      public static String decodeUri(String encoded)
      Returns the URI decoding of a UTF-8 string, replacing %xx escapes by their single byte equivalent. For example, reading "a%20b_c" would write "a b_c".
      Parameters:
      encoded - The encoded URI to be decoded.
      Returns:
      decoded URI