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 a
String
into a byte[]
.
The supported formats are:
- 0x0123456789ABCDEF
- Base64:ABase64String
- String using
Charset.defaultCharset()
[TODO Should this be UTF-8 instead?]
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ByteArrayConverter
public ByteArrayConverter()
-
-
Method Details
-
convert
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.
-