Base64ByteStringConverter

Stringokio.ByteString via Base64 (RFC 4648).

Same type pair as StringByteStringConverter (UTF-8), so it is an alternate: auto-discovery resolves one converter per type pair. Select this one either per-field with @ConvertWith(Base64ByteStringConverter::class), or register it in your @KMapperConfig(converters = [...]) instead of the UTF-8 converter.

Decoding accepts both the standard and URL-safe alphabets and rejects malformed input with IllegalArgumentException. Encoding uses the standard alphabet with padding.

Properties

Link copied to clipboard
Link copied to clipboard
val targetType: KClass<ByteString>

Functions

Link copied to clipboard
open override fun convertFrom(target: ByteString): String
Link copied to clipboard
open fun convertFromOrNull(target: ByteString): String?
Link copied to clipboard
open override fun convertTo(source: String): ByteString
Link copied to clipboard
open fun convertToOrNull(source: String): ByteString?