1 BufferedWriter out = null; 2 try { 3 out = new BufferedWriter(new FileWriter(”filename”, true)); 4 out.write(”aString”); 5 } catch (IOException e) { 6 // error processing code 7 } finally { 8 if (out != null) { 9 out.close(); 10 } 11 }
Powered by: 博客园 Copyright © 2025 天一涯 Powered by .NET 9.0 on Kubernetes