复制代码代码如下 : BufferedWriter out = null ; essayer { out = new BufferedWriter(new FileWriter(”filename”, true)); out.write("aString"); } catch (IOException e) { // code de traitement d'erreur } enfin { si (out != null) { out.close(); } }