Package org.gephi.graph.api
Class GraphModel.Serialization
- java.lang.Object
-
- org.gephi.graph.api.GraphModel.Serialization
-
- Enclosing interface:
- GraphModel
public static class GraphModel.Serialization extends Object
Serialization utility to read/write graph models from/to input/output.
-
-
Constructor Summary
Constructors Constructor Description Serialization()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GraphModel
read(DataInput input)
Read theinput
and return the read graph model.static GraphModel
readWithoutVersionHeader(DataInput input, float graphStoreVersion)
Read theinput
and return the read graph model without an explicit version header in the input.static void
write(DataOutput output, GraphModel graphModel)
WritegraphModel
tooutput
.
-
-
-
Method Detail
-
read
public static GraphModel read(DataInput input) throws IOException
Read theinput
and return the read graph model.- Parameters:
input
- data input to read from- Returns:
- new graph model
- Throws:
IOException
- if an io error occurs
-
readWithoutVersionHeader
public static GraphModel readWithoutVersionHeader(DataInput input, float graphStoreVersion) throws IOException
Read theinput
and return the read graph model without an explicit version header in the input. To be used with old graphstore serialized data prior to version 0.4 (first, that added the version header).- Parameters:
input
- data input to read fromgraphStoreVersion
- Forced version to use- Returns:
- new graph model
- Throws:
IOException
- if an io error occurs
-
write
public static void write(DataOutput output, GraphModel graphModel) throws IOException
WritegraphModel
tooutput
.- Parameters:
output
- data output to write tographModel
- graph model to write- Throws:
IOException
- if an io error occurs
-
-