private Tree[] readTreesBlock(TaxonList taxonList,boolean useTaxonListNumbering) throws ImportException, IOException {
  ArrayList<Tree> trees=new ArrayList<Tree>();
  String[] lastToken=new String[1];
  HashMap<String,Taxon> translationList=readTranslationList(taxonList,lastToken);
  boolean done=false;
  do {
    Tree tree=readNextTree(translationList,lastToken,useTaxonListNumbering ? taxonList : null);
    if (tree != null) {
      trees.add(tree);
    }
 else {
      done=true;
    }
  }
 while (!done);
  if (trees.size() == 0) {
    throw new BadFormatException("No trees defined in TREES block");
  }
  Tree[] treeArray=new Tree[trees.size()];
  trees.toArray(treeArray);
  nextBlock=UNKNOWN_BLOCK;
  return treeArray;
}

private Tree [ ] readTreesBlock ( TaxonList taxonList , boolean useTaxonListNumbering ) throws ImportException , IOException { ArrayList < Tree > trees = new ArrayList < Tree > ( ) ; String [ ] lastToken = new String [ 1 ] ; HashMap < String , Taxon > translationList = readTranslationList ( taxonList , lastToken ) ; boolean done = false ; do { Tree tree = readNextTree ( translationList , lastToken , useTaxonListNumbering ? taxonList : null ) ; if ( tree != null ) { trees . add ( tree ) ; } else { done = true ; } } while ( ! done ) ; if ( trees . size ( ) == 0 ) { throw new BadFormatException ( "No trees defined in TREES block" ) ; } Tree [ ] treeArray = new Tree [ trees . size ( ) ] ; trees . toArray ( treeArray ) ; nextBlock = UNKNOWN_BLOCK ; return treeArray ; }
reads a ' trees ' block .
