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