Class TypeConverters.ByteArrayConverter
- java.lang.Object
-
- org.apache.logging.log4j.core.config.plugins.convert.TypeConverters.ByteArrayConverter
-
- All Implemented Interfaces:
TypeConverter<byte[]>
- Enclosing class:
- TypeConverters
@Plugin(name="ByteArray", category="TypeConverter") public static class TypeConverters.ByteArrayConverter extends Object implements TypeConverter<byte[]>
Converts aString
into abyte[]
. The supported formats are:- 0x0123456789ABCDEF
- Base64:ABase64String
- String using
Charset.defaultCharset()
[TODO Should this be UTF-8 instead?]
-
-
Constructor Summary
Constructors Constructor Description ByteArrayConverter()
-
-
-
Method Detail
-
convert
public byte[] convert(String value)
Description copied from interface:TypeConverter
Converts a String to a given type.- Specified by:
convert
in interfaceTypeConverter<byte[]>
- Parameters:
value
- the String to convert. Cannot benull
.- Returns:
- the converted object.
-
-