spring-framework / org.springframework.web.util / UriUtils / encodeScheme

encodeScheme

open static fun encodeScheme(scheme: String, encoding: String): String

Encode the given URI scheme with the given encoding.

Parameters

scheme - the scheme to be encoded

encoding - the character encoding to encode to

Exceptions

UnsupportedEncodingException - when the given encoding parameter is not supported

Return
the encoded scheme

open static fun encodeScheme(scheme: String, charset: Charset): String

Encode the given URI scheme with the given encoding.

Parameters

scheme - the scheme to be encoded

charset - the character encoding to encode to

Return
the encoded scheme

Since
5.0