JTMTopicMapWriter implements TopicMapWriterIF { @Override public void write(TopicMapIF tm) throws IOException { write((TMObjectIF) tm); } JTMTopicMapWriter(File file);  JTMTopicMapWriter(File file, String encoding);  JTMTopicMapWriter(OutputStream stream);  JTMTopicMapWriter(OutputStream stream, String encoding);  JTMTopicMapWriter(Writer out); @Override void write(TopicMapIF tm); void write(TMObjectIF object); void write(Collection<TopicIF> topics,
                    Collection<AssociationIF> assocs); @Override void setAdditionalProperties(Map<String, Object> properties);  }
@Test public void testWriteToFile() throws IOException { builder.makeTopic(); File file = TestFileUtils.getTestOutputFile("jtm", "io-f.jtm"); new JTMTopicMapWriter(file).write(tm); Assert.assertTrue(Files.size(file.toPath()) > 0); }
@Test public void testWriteToOutputStream() throws IOException { builder.makeTopic(); File file = TestFileUtils.getTestOutputFile("jtm", "io-o.jtm"); new JTMTopicMapWriter(new FileOutputStream(file)).write(tm); Assert.assertTrue(Files.size(file.toPath()) > 0); }
@Test public void testWriteToWriter() throws IOException { builder.makeTopic(); File file = TestFileUtils.getTestOutputFile("jtm", "io-w.jtm"); new JTMTopicMapWriter(new FileWriter(file)).write(tm); Assert.assertTrue(Files.size(file.toPath()) > 0); }