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

encodePort

open static fun encodePort(port: String, encoding: String): String

Encode the given URI port with the given encoding.

Parameters

port - the port to be encoded

encoding - the character encoding to encode to

Exceptions

UnsupportedEncodingException - when the given encoding parameter is not supported

Return
the encoded port

open static fun encodePort(port: String, charset: Charset): String

Encode the given URI port with the given encoding.

Parameters

port - the port to be encoded

charset - the character encoding to encode to

Return
the encoded port

Since
5.0