java.lang.Object
io.helidon.common.uri.UriEncoding
Support for encoding and decoding of URI in HTTP.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
decodeQuery
(String uriQuery) Decode a URI query.static String
Decode a URI segment.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.static String
Encode a URI segment.
-
Method Details
-
decodeUri
Decode a URI segment.Percent characters
"%s"
found between brackets"[]"
are not decoded to support IPv6 literal. E.g.http://[fe80::1%lo0]:8080
.- Parameters:
uriSegment
- URI segment with percent encoding- Returns:
- decoded string
-
decodeQuery
Decode a URI query.- Parameters:
uriQuery
- URI query with percent encoding- Returns:
- decoded string
-
encodeUri
Encode a URI segment.- Parameters:
uriSegment
- URI segment that may contain characters not allowed by the URI- Returns:
- URI segment with percent encoding
-
encode
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 encodedt
- the URI component type identifying the ASCII characters that must be percent-encoded- Returns:
- the encoded string
-