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

decode

open static fun decode(source: String, encoding: String): String

Decode the given encoded URI component.

See StringUtils#uriDecode(String, Charset) for the decoding rules.

Parameters

source - the encoded String

encoding - the character encoding to use

Exceptions

IllegalArgumentException - when the given source contains invalid encoded sequences

UnsupportedEncodingException - when the given encoding parameter is not supported

Return
the decoded value

See Also
StringUtils#uriDecode(String, Charset)java.net.URLDecoder#decode(String, String)

open static fun decode(source: String, charset: Charset): String

Decode the given encoded URI component.

See StringUtils#uriDecode(String, Charset) for the decoding rules.

Parameters

source - the encoded String

charset - the character encoding to use

Exceptions

IllegalArgumentException - when the given source contains invalid encoded sequences

Return
the decoded value

Since
5.0

See Also
StringUtils#uriDecode(String, Charset)java.net.URLDecoder#decode(String, String)