public class SerializerDeserializer extends Object
| Constructor and Description |
|---|
SerializerDeserializer() |
| Modifier and Type | Method and Description |
|---|---|
static <U extends Serializable> |
fromBytes(byte[] data)
Convenience method to deserialize an object into a type from raw serialized data produced by the method
toBytes(Serializable). |
static <U extends Serializable> |
toBytes(U object)
Convenience method to serializes the given
Serializable object to a raw byte[]. |
public static <U extends Serializable> U fromBytes(byte[] data)
toBytes(Serializable).U - The class to try to get the data as.data - The raw serialized byte[] representing the data.public static <U extends Serializable> byte[] toBytes(U object)
Serializable object to a raw byte[].U - The subtype of Serializable to try and serialize.object - The object to serialize.Copyright © 2021. All rights reserved.