Interface GraphExporter<V,​E>

Type Parameters:
V - the graph vertex type
E - the graph edge type
All Known Implementing Classes:
CSVExporter, DIMACSExporter, DOTExporter, GEXFExporter, GmlExporter, Graph6Sparse6Exporter, GraphMLExporter, JSONExporter, LemonExporter, MatrixExporter, VisioExporter

public interface GraphExporter<V,​E>
Interface for graph exporters
  • Method Summary

    Modifier and Type Method Description
    default void exportGraph​(Graph<V,​E> g, java.io.File file)
    Export a graph to the given File.
    default void exportGraph​(Graph<V,​E> g, java.io.OutputStream out)
    Export a graph to the given OutputStream.
    void exportGraph​(Graph<V,​E> g, java.io.Writer writer)
    Export a graph using the given Writer.
  • Method Details

    • exportGraph

      default void exportGraph​(Graph<V,​E> g, java.io.OutputStream out)
      Export a graph to the given OutputStream.

      It is the callers responsibility to ensure the OutputStream is closed after this method returned.

      Parameters:
      g - the graph to export
      out - the output stream
      Throws:
      ExportException - in case any error occurs
    • exportGraph

      void exportGraph​(Graph<V,​E> g, java.io.Writer writer)
      Export a graph using the given Writer.

      It is the callers responsibility to ensure the Writer is closed after this method returned.

      Parameters:
      g - the graph to export
      writer - the output writer
      Throws:
      ExportException - in case any error occurs
    • exportGraph

      default void exportGraph​(Graph<V,​E> g, java.io.File file)
      Export a graph to the given File.
      Parameters:
      g - the graph to export
      file - the file to write to
      Throws:
      ExportException - in case any error occurs