public class SerializationHelper extends Object
| Constructor and Description |
|---|
SerializationHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Graph |
deserialize(byte[] data)
Deserializes given byte array into a Graph
using a Serializer implementation encoded in the serialized data.
|
static byte[] |
serialize(Class<?> serializerClass,
Graph graph)
Serializes given Graph using given Serializer.
|
public static byte[] serialize(Class<?> serializerClass, Graph graph) throws InstantiationException, IllegalAccessException
serializerClass - a Class which would be used to serialize the graphgraph - a Graph to serializeInstantiationExceptionIllegalAccessExceptionpublic static Graph deserialize(byte[] data) throws ClassNotFoundException, InstantiationException, IllegalAccessException
data - byte array containing the serialization of a graphClassNotFoundExceptionInstantiationExceptionIllegalAccessExceptionCopyright © 2019–2020. All rights reserved.