public void toPhyloXML( final File out_file, final Phylogeny tree, final int phyloxml_level ) throws IOException { final Writer writer = new BufferedWriter( new PrintWriter( out_file ) ); writePhyloXmlStart( writer ); toPhyloXMLNoPhyloXmlSource( writer, tree, phyloxml_level ); writePhyloXmlEnd( writer ); writer.flush(); writer.close(); }
public void toPhyloXML( final Writer writer, final List<Phylogeny> trees, final int phyloxml_level, final String separator ) throws IOException { writePhyloXmlStart( writer ); final Iterator<Phylogeny> it = trees.iterator(); while ( it.hasNext() ) { toPhyloXMLNoPhyloXmlSource( writer, it.next(), phyloxml_level ); writer.write( separator ); } writePhyloXmlEnd( writer ); }
public void toPhyloXML( final Writer writer, final Phylogeny[] trees, final int phyloxml_level, final String separator ) throws IOException { writePhyloXmlStart( writer ); for( final Phylogeny phylogeny : trees ) { toPhyloXMLNoPhyloXmlSource( writer, phylogeny, phyloxml_level ); writer.write( separator ); } writePhyloXmlEnd( writer ); }
public StringBuffer toPhyloXML( final Phylogeny tree, final int phyloxml_level ) throws IOException { final StringWriter string_writer = new StringWriter(); final Writer writer = new BufferedWriter( string_writer ); setPhyloXmlLevel( phyloxml_level ); setOutputFormt( FORMAT.PHYLO_XML ); writePhyloXmlStart( writer ); writeOutput( writer, tree ); writePhyloXmlEnd( writer ); writer.flush(); writer.close(); return string_writer.getBuffer(); }
public void toPhyloXML( final Writer writer, final Phylogeny tree, final int phyloxml_level ) throws IOException { setPhyloXmlLevel( phyloxml_level ); setOutputFormt( FORMAT.PHYLO_XML ); writePhyloXmlStart( writer ); writeOutput( writer, tree ); writePhyloXmlEnd( writer ); }