public class GraphBinaryIo extends Object implements Io
Io
which is only used in the context of helping to configure a
GraphBinary MessageSerializer
with an IoRegistry
. It's methods are not implemented.Io.Builder<I extends Io>, Io.Exceptions
Constructor and Description |
---|
GraphBinaryIo() |
Modifier and Type | Method and Description |
---|---|
Mapper.Builder |
mapper()
Constructs a
Mapper.Builder which is responsible for constructing the abstraction over different
serialization methods. |
GraphReader.ReaderBuilder |
reader()
Creates a
GraphReader.ReaderBuilder implementation . |
void |
readGraph(String file)
Read a
Graph from file using the default configuration of the Io.reader() and its supplied
Io.mapper() . |
void |
writeGraph(String file)
Write a
Graph to file using the default configuration of the Io.writer() and its supplied
Io.mapper() . |
GraphWriter.WriterBuilder |
writer()
Creates a
GraphWriter.WriterBuilder implementation . |
public GraphReader.ReaderBuilder reader()
Io
GraphReader.ReaderBuilder
implementation . Implementers should call the
Io.mapper()
function to feed its result to the builder. In this way, custom class serializers
registered to the Mapper.Builder
by Graph
implementations will end up being used for
the serialization process.public GraphWriter.WriterBuilder writer()
Io
GraphWriter.WriterBuilder
implementation . Implementers should call the
Io.mapper()
function to feed its result to the builder. In this way, custom class serializers
registered to the Mapper.Builder
by Graph
implementations will end up being used for
the serialization process.public Mapper.Builder mapper()
Io
Mapper.Builder
which is responsible for constructing the abstraction over different
serialization methods. Implementations should set defaults as required, but most importantly need to
make the appropriate call to Mapper.Builder.addRegistry(IoRegistry)
which will provide the
builder with any required custom serializers of the Graph
.public void writeGraph(String file) throws IOException
Io
Graph
to file using the default configuration of the Io.writer()
and its supplied
Io.mapper()
.writeGraph
in interface Io
IOException
public void readGraph(String file) throws IOException
Io
Graph
from file using the default configuration of the Io.reader()
and its supplied
Io.mapper()
.readGraph
in interface Io
IOException
Copyright © 2013–2023 Apache Software Foundation. All rights reserved.