Class ByteArraySerializer
java.lang.Object
de.iip_ecosphere.platform.transport.serialization.ByteArraySerializer
- All Implemented Interfaces:
InputTypeTranslator<byte[],,byte[]> OutputTypeTranslator<byte[],,byte[]> Serializer<byte[]>,TypeTranslator<byte[],byte[]>
A default serializer for byte[].
- Author:
- Holger Eichelberger, SSE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]clone(byte[] origin) Creates a new value instance and copies the values fromoriginto the new instance.byte[]from(byte[] data) Deserializes a target value into a source value ("input from external").Class<byte[]> getType()The type to be handled by this serializer.byte[]to(byte[] source) Translates a source value into a target value ("output to external").
-
Constructor Details
-
ByteArraySerializer
public ByteArraySerializer()
-
-
Method Details
-
from
Description copied from interface:InputTypeTranslatorDeserializes a target value into a source value ("input from external").- Specified by:
fromin interfaceInputTypeTranslator<byte[],byte[]> - Parameters:
data- the data to be translated back- Returns:
- the serialized object
- Throws:
IOException- in case that serialization fails
-
to
Description copied from interface:OutputTypeTranslatorTranslates a source value into a target value ("output to external").- Specified by:
toin interfaceOutputTypeTranslator<byte[],byte[]> - Parameters:
source- the source value to be translated- Returns:
- the target value
- Throws:
IOException- in case that translation fails
-
clone
Description copied from interface:SerializerCreates a new value instance and copies the values fromoriginto the new instance. Use theSerializerRegistryto implement cloning of nested object values.- Specified by:
clonein interfaceSerializer<byte[]>- Parameters:
origin- the object to clone- Returns:
- the cloned object
- Throws:
IOException- in case that cloning/serialization operations fail
-
getType
Description copied from interface:SerializerThe type to be handled by this serializer.- Specified by:
getTypein interfaceSerializer<byte[]>- Returns:
- the type
-