Class UriEncoding

java.lang.Object
io.helidon.common.uri.UriEncoding

public final class UriEncoding extends Object
Support for encoding and decoding of URI in HTTP.
  • Method Details

    • decodeUri

      public static String decodeUri(String uriSegment)
      Decode a URI segment.
      Parameters:
      uriSegment - URI segment with percent encoding
      Returns:
      decoded string
    • encodeUri

      public static String encodeUri(String uriSegment)
      Encode a URI segment.
      Parameters:
      uriSegment - URI segment that may contain characters not allowed by the URI
      Returns:
      URI segment with percent encoding
    • encode

      public static String encode(String s, UriEncoding.Type t)
      Encodes the characters of string that are either non-ASCII characters or are ASCII characters that are not allowed.
      Parameters:
      s - the string to be encoded
      t - the URI component type identifying the ASCII characters that must be percent-encoded
      Returns:
      the encoded string