abstract class UriUtils
Utility class for URI encoding and decoding based on RFC 3986. Offers encoding methods for the various URI components.
All encode*(String, String)
methods in this class operate in a similar way:
%xy
" format.Author
Arjen Poutsma
Author
Juergen Hoeller
Since
3.0
See Also
<a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>
UriUtils()
Utility class for URI encoding and decoding based on RFC 3986. Offers encoding methods for the various URI components. All
|
open static fun decode(source: String, encoding: String): String open static fun decode(source: String, charset: Charset): String
Decode the given encoded URI component. See |
|
open static fun encode(source: String, encoding: String): String open static fun encode(source: String, charset: Charset): String
Encode characters outside the unreserved character set as defined in RFC 3986 Section 2. This can be used to ensure the given String will not contain any characters with reserved URI meaning regardless of URI component. |
|
open static fun encodeAuthority(authority: String, encoding: String): String open static fun encodeAuthority(authority: String, charset: Charset): String
Encode the given URI authority with the given encoding. |
|
open static fun encodeFragment(fragment: String, encoding: String): String open static fun encodeFragment(fragment: String, charset: Charset): String
Encode the given URI fragment with the given encoding. |
|
open static fun encodeHost(host: String, encoding: String): String open static fun encodeHost(host: String, charset: Charset): String
Encode the given URI host with the given encoding. |
|
open static fun encodePath(path: String, encoding: String): String open static fun encodePath(path: String, charset: Charset): String
Encode the given URI path with the given encoding. |
|
open static fun encodePathSegment(segment: String, encoding: String): String open static fun encodePathSegment(segment: String, charset: Charset): String
Encode the given URI path segment with the given encoding. |
|
open static fun encodePort(port: String, encoding: String): String open static fun encodePort(port: String, charset: Charset): String
Encode the given URI port with the given encoding. |
|
open static fun encodeQuery(query: String, encoding: String): String open static fun encodeQuery(query: String, charset: Charset): String
Encode the given URI query with the given encoding. |
|
open static fun encodeQueryParam(queryParam: String, encoding: String): String open static fun encodeQueryParam(queryParam: String, charset: Charset): String
Encode the given URI query parameter with the given encoding. |
|
open static fun encodeScheme(scheme: String, encoding: String): String open static fun encodeScheme(scheme: String, charset: Charset): String
Encode the given URI scheme with the given encoding. |
|
open static fun encodeUriVariables(uriVariables: MutableMap<String, *>): MutableMap<String, String>
Apply open static fun encodeUriVariables(vararg uriVariables: Any): Array<Any>
Apply |
|
open static fun encodeUserInfo(userInfo: String, encoding: String): String open static fun encodeUserInfo(userInfo: String, charset: Charset): String
Encode the given URI user info with the given encoding. |
|
open static fun extractFileExtension(path: String): String
Extract the file extension from the given URI path. |