Class ByteArrayToStringConverter
- java.lang.Object
-
- io.axoniq.dataprotection.serialization.converters.ByteArrayToStringConverter
-
- All Implemented Interfaces:
ContentTypeConverter<byte[],String>
public class ByteArrayToStringConverter extends Object implements ContentTypeConverter<byte[],String>
ContentTypeConverter that converts byte arrays into Strings. Conversion is done using the UTF-8 character set.- Since:
- 2.0
- Author:
- Allard Buijze
-
-
Constructor Summary
Constructors Constructor Description ByteArrayToStringConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringconvert(byte[] original)Converts the given object into another.Class<byte[]>expectedSourceType()The expected type of input data.Class<String>targetType()The returned type of IntermediateRepresentation
-
-
-
Method Detail
-
expectedSourceType
public Class<byte[]> expectedSourceType()
Description copied from interface:ContentTypeConverterThe expected type of input data.- Specified by:
expectedSourceTypein interfaceContentTypeConverter<byte[],String>- Returns:
- the expected data format in IntermediateRepresentation
-
targetType
public Class<String> targetType()
Description copied from interface:ContentTypeConverterThe returned type of IntermediateRepresentation- Specified by:
targetTypein interfaceContentTypeConverter<byte[],String>- Returns:
- the output data format in IntermediateRepresentation
-
convert
public String convert(byte[] original)
Description copied from interface:ContentTypeConverterConverts the given object into another. Typically, these values are contained by aSerializedObjectinstance.- Specified by:
convertin interfaceContentTypeConverter<byte[],String>- Parameters:
original- the value to convert- Returns:
- the converted value
-
-