Package org.ametys.core.util
Class URIUtils
java.lang.Object
org.ametys.core.util.URIUtils
Utility class for encoding and decoding URL, following the RFC 3986
- See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuild an URL.static StringDecodes an URI-encoded String.static StringencodeFragment(String value) Encode a fragment's value using UTF-8 encodingstatic StringencodeHeader(String header) Encode a request header value.static StringencodeParameter(String value) Encode a parameter's value using UTF-8 encodingstatic StringencodePath(String path) Encode an URL pathstatic StringencodePathSegment(String pathSegment) Encode an URL path segmentstatic StringEncode an URL path 
- 
Method Details
- 
encodeParameter
Encode a parameter's value using UTF-8 encoding- Parameters:
 value- the value or the name of the request's parameter to encode- Returns:
 - the encoded value.
 
 - 
encodeFragment
Encode a fragment's value using UTF-8 encoding- Parameters:
 value- the value or the name of the request's fragment to encode- Returns:
 - the encoded value.
 
 - 
encodePath
Encode an URL path- Parameters:
 path- the path to encode (before question-mark character)- Returns:
 - the encoded path.
 
 - 
encodePathSegment
Encode an URL path segment- Parameters:
 pathSegment- the path segment to encode- Returns:
 - the encoded path segment.
 
 - 
encodeHeader
Encode a request header value.- Parameters:
 header- the value to encode- Returns:
 - the encoded value.
 
 - 
encodeURI
Encode an URL path- Parameters:
 path- the path to encode (before question-mark character)parameters- the parameters. Can be null.- Returns:
 - the encoded path
 
 - 
buildURI
Build an URL.- Parameters:
 path- the URL path.parameters- the URL parameters. Can be null.- Returns:
 - the computed URL.
 
 - 
decode
Decodes an URI-encoded String.- Parameters:
 source- the String to decode.- Returns:
 - the decoded String.
 
 
 -