spring-framework / org.springframework.util / Base64Utils / decodeFromUrlSafeString

decodeFromUrlSafeString

open static fun decodeFromUrlSafeString(src: String): ByteArray

Base64-decode the given byte array from an UTF-8 String using the RFC 4648 "URL and Filename Safe Alphabet".

Parameters

src - the encoded UTF-8 String

Exceptions

IllegalStateException - if Base64 encoding between byte arrays is not supported, i.e. neither Java 8 nor Apache Commons Codec is present at runtime

Return
the original byte array