새 데이터를 GUI에 입력하고 다음 파일로 내 보내면 기존 데이터를 바꿉니다. 어떻게이를 방지하고 기존 데이터에 추가합니까?외부 파일의 기존 데이터를 덮어 씁니다. 어떻게 중지합니까?
감사
public void exportContacts()
{
FileOutputStream file;
PrintStream out;
try { file = new FileOutputStream("../files/example.buab");
out = new PrintStream(file);
out.println(txtname.getText());
out.println(txtnum.getText());
out.println(txtmob.getText());
out.println(txtadd1.getText());
System.err.println ("");
out.close();
}
catch (Exception e)
{
System.err.println ("Error in writing to file");
}
}
확인 감사합니다, 그것은 지금은 완벽하게 작동 지금 – tom1390