code: public void writeTreesInOneLineFormat(File outFile) throws IOException {
          BufferedWriter writer = new BufferedWriter(new FileWriter(outFile));
          for (BinaryTree tree : this) {
              writer.write(tree.getAsOneLineString());
              writer.write("\n");
          }
          writer.close();        
      }
docs: Writes the trees to a file.
  @param outFile The output file.
  @throws IOException