复制代码代码如下: BufferedWriter out = null; versuchen { out = new BufferedWriter(new FileWriter(“filename“, true)); out.write("aString"); } Catch (IOException e) { // Fehlerverarbeitungscode } Endlich { if (out != null) { out.close(); } }