IeeeCdfImporter implements Importer { @Override public void copy(ReadOnlyDataSource fromDataSource, DataSource toDataSource) { Objects.requireNonNull(fromDataSource); Objects.requireNonNull(toDataSource); try { try (InputStream is = fromDataSource.newInputStream(null, EXT); OutputStream os = toDataSource.newOutputStream(null, EXT, false)) { ByteStreams.copy(is, os); } } catch (IOException e) { throw new UncheckedIOException(e); } }  @Override String getFormat(); @Override List<Parameter> getParameters(); @Override String getComment(); @Override boolean exists(ReadOnlyDataSource dataSource); @Override void copy(ReadOnlyDataSource fromDataSource, DataSource toDataSource); @Override Network importData(ReadOnlyDataSource dataSource, NetworkFactory networkFactory, Properties parameters);  }
@Test public void copyTest() { new IeeeCdfImporter().copy(new ResourceDataSource("ieee14cdf", new ResourceSet("/", "ieee14cdf.txt")), new FileDataSource(fileSystem.getPath("/work"), "copy")); assertTrue(Files.exists(fileSystem.getPath("/work").resolve("copy.txt"))); }