Class JavaSerializer
java.lang.Object
org.drasyl.node.handler.serialization.JavaSerializer
- All Implemented Interfaces:
Serializer
This Serializer (de)serializes
Serializable objects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TfromByteArray(byte[] bytes, Class<T> type) Produces an object of typeTfrom an array of bytes.byte[]Serializes the given object into an array of bytesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.drasyl.node.handler.serialization.Serializer
fromByteArray
-
Constructor Details
-
JavaSerializer
public JavaSerializer()
-
-
Method Details
-
toByteArray
Description copied from interface:SerializerSerializes the given object into an array of bytes- Specified by:
toByteArrayin interfaceSerializer- Throws:
IOException- if deserialization to byte array fails
-
fromByteArray
Description copied from interface:SerializerProduces an object of typeTfrom an array of bytes.- Specified by:
fromByteArrayin interfaceSerializer- Throws:
IOException- if serialization to byte array fails
-