Class Url
java.lang.Object
com.google.gerrit.extensions.restapi.Url
URL related utility functions.
-
Method Summary
-
Method Details
-
encode
Encode a path segment, escaping characters not valid for a URL.The following characters are not escaped:
a..z, A..Z, 0..9
. - * _
' ' (space) is encoded as '+'.
All other characters (including '/') are converted to the triplet "%xy" where "xy" is the hex representation of the character in UTF-8.
- Parameters:
component
- a string containing text to encode.- Returns:
- a string with all invalid URL characters escaped.
-
decode
Decode a URL encoded string, e.g. from"%2F"
to"/"
.
-