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

encode

open static fun encode(src: ByteArray): ByteArray

Base64-encode the given byte array.

Parameters

src - the original byte array

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 encoded byte array