Class Dom4JToByteArrayConverter
java.lang.Object
org.axonframework.serialization.xml.Dom4JToByteArrayConverter
- All Implemented Interfaces:
ContentTypeConverter<org.dom4j.Document,byte[]>
public class Dom4JToByteArrayConverter
extends Object
implements ContentTypeConverter<org.dom4j.Document,byte[]>
Converter that converts Dom4j Document instances to a byte array. The Document is written as XML string, and
converted to bytes using the UTF-8 character set.
- Since:
- 2.0
- Author:
- Allard Buijze
-
Constructor Details
-
Dom4JToByteArrayConverter
public Dom4JToByteArrayConverter()
-
-
Method Details
-
expectedSourceType
Description copied from interface:ContentTypeConverterThe expected type of input data.- Specified by:
expectedSourceTypein interfaceContentTypeConverter<org.dom4j.Document,byte[]> - Returns:
- the expected data format in IntermediateRepresentation
-
targetType
Description copied from interface:ContentTypeConverterThe returned type of IntermediateRepresentation- Specified by:
targetTypein interfaceContentTypeConverter<org.dom4j.Document,byte[]> - Returns:
- the output data format in IntermediateRepresentation
-
convert
public byte[] convert(org.dom4j.Document original) Description copied from interface:ContentTypeConverterConverts the given object into another. Typically, these values are contained by aSerializedObjectinstance.- Specified by:
convertin interfaceContentTypeConverter<org.dom4j.Document,byte[]> - Parameters:
original- the value to convert- Returns:
- the converted value
-