Package org.jgrapht.nio
Interface GraphImporter<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Known Implementing Classes:
CSVImporter
,DIMACSImporter
,DOTImporter
,GmlImporter
,Graph6Sparse6Importer
,GraphMLImporter
,JSONImporter
,SimpleGraphMLImporter
public interface GraphImporter<V,E>
Interface for graph importers
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
importGraph(Graph<V,E> g, File file)
Import a graph from the givenFile
.default void
importGraph(Graph<V,E> g, InputStream in)
Import a graph from the givenInputStream
.void
importGraph(Graph<V,E> g, Reader in)
Import a graph using the givenReader
.
-
-
-
Method Detail
-
importGraph
default void importGraph(Graph<V,E> g, InputStream in)
Import a graph from the givenInputStream
.It is the callers responsibility to ensure the
InputStream
is closed after this method returned.- Parameters:
g
- the graphin
- the input stream- Throws:
ImportException
- in case any error occurs, such as I/O or parse error
-
importGraph
void importGraph(Graph<V,E> g, Reader in)
Import a graph using the givenReader
.It is the callers responsibility to ensure the
Reader
is closed after this method returned.- Parameters:
g
- the graphin
- the input reader- Throws:
ImportException
- in case any error occurs, such as I/O or parse error
-
-