我用
try {
DataOutputStream out = c.openDataOutputStream();
String text = file + " | " + tag + " | " + report + " \n ";
out.write(text.getBytes());
out.close();
} catch (Exception e) {
System.out.println("IOException OutputStream: "+e.getMessage());
}`
但它会删除文件中的所有现有数据。