Package org.insa.graphs.model.io
Interface GraphReader
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
- All Known Implementing Classes:
BinaryGraphReader
public interface GraphReader extends java.lang.AutoCloseable, java.io.Closeable
Base interface for classes that can read graph.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addObserver(GraphReaderObserver observer)
Add a new observer to this graph reader.void
close()
Close this graph reader.Graph
read()
Read a graph an returns it.
-
-
-
Method Detail
-
addObserver
void addObserver(GraphReaderObserver observer)
Add a new observer to this graph reader.- Parameters:
observer
- Observer to add.
-
read
Graph read() throws java.io.IOException
Read a graph an returns it.- Returns:
- The graph read.
- Throws:
java.io.IOException
- if an exception occurs while reading the graph.
-
close
void close() throws java.io.IOException
Close this graph reader.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
- if an exception occurs while closing the reader.
-
-