Ben yinelemeli dosyaya bir ikili arama ağacı yazma anlamaya olamaz. Ben Ağacı sınıfında da wrtie için dosyayla ilgili bir BufferWriter açın. Sonra inorder ağaç travers ve dosyaya yazmak için Düğüm sınıfına BufferWriter gönderin. Ama çalışmıyor.
public void write(String filePath)
{
if(root != null) {
try {
BufferedWriter out = new BufferedWriter(new FileWriter(filePath));
root.write(out);
} catch (IOException e) {
}
}
}
public void write(BufferedWriter out)
{
if (this.getLeft() != null) this.getLeft().write(out);
out.write(this.data());
if (this.getRight() != null) this.getRight().write(out);
}













