@Test public void export3() throws IOException { Path dir = Files.createTempDirectory("tmp-export"); Exporters.export(loader, TEST_FORMAT, null, null, dir.toString(), "tmp"); try (InputStream is = Files.newInputStream(dir.resolve("tmp.tst"))) { assertEquals(Byte.BYTES, is.read()); } }
public static void export(ExportersLoader loader, String format, Network network, Properties parameters, DataSource dataSource) { Exporter exporter = getExporter(loader, format); if (exporter == null) { throw new PowsyblException("Export format " + format + " not supported"); } exporter.export(network, parameters, dataSource); }
Exporters { public static void export(ExportersLoader loader, String format, Network network, Properties parameters, DataSource dataSource) { Exporter exporter = getExporter(loader, format); if (exporter == null) { throw new PowsyblException("Export format " + format + " not supported"); } exporter.export(network, parameters, dataSource); } }
Exporters { public static void export(ExportersLoader loader, String format, Network network, Properties parameters, DataSource dataSource) { Exporter exporter = getExporter(loader, format); if (exporter == null) { throw new PowsyblException("Export format " + format + " not supported"); } exporter.export(network, parameters, dataSource); } private  Exporters(); }
Exporters { public static void export(ExportersLoader loader, String format, Network network, Properties parameters, DataSource dataSource) { Exporter exporter = getExporter(loader, format); if (exporter == null) { throw new PowsyblException("Export format " + format + " not supported"); } exporter.export(network, parameters, dataSource); } private  Exporters(); static Collection<String> getFormats(ExportersLoader loader); static Collection<String> getFormats(); static Exporter getExporter(ExportersLoader loader, String format); static Exporter getExporter(String format); static DataSource createDataSource(Path directory, String fileNameOrBaseName, DataSourceObserver observer); static DataSource createDataSource(Path file, DataSourceObserver observer); static DataSource createDataSource(Path file); static void export(ExportersLoader loader, String format, Network network, Properties parameters, DataSource dataSource); static void export(String format, Network network, Properties parameters, DataSource dataSource); static void export(ExportersLoader loader, String format, Network network, Properties parameters, Path file); static void export(String format, Network network, Properties parameters, Path file); static void export(ExportersLoader loader, String format, Network network, Properties parameters, String directory, String baseName); static void export(String format, Network network, Properties parameters, String directory, String baseName); }
Exporters { public static void export(ExportersLoader loader, String format, Network network, Properties parameters, DataSource dataSource) { Exporter exporter = getExporter(loader, format); if (exporter == null) { throw new PowsyblException("Export format " + format + " not supported"); } exporter.export(network, parameters, dataSource); } private  Exporters(); static Collection<String> getFormats(ExportersLoader loader); static Collection<String> getFormats(); static Exporter getExporter(ExportersLoader loader, String format); static Exporter getExporter(String format); static DataSource createDataSource(Path directory, String fileNameOrBaseName, DataSourceObserver observer); static DataSource createDataSource(Path file, DataSourceObserver observer); static DataSource createDataSource(Path file); static void export(ExportersLoader loader, String format, Network network, Properties parameters, DataSource dataSource); static void export(String format, Network network, Properties parameters, DataSource dataSource); static void export(ExportersLoader loader, String format, Network network, Properties parameters, Path file); static void export(String format, Network network, Properties parameters, Path file); static void export(ExportersLoader loader, String format, Network network, Properties parameters, String directory, String baseName); static void export(String format, Network network, Properties parameters, String directory, String baseName);  }