- BufferedWriter out = null;
- try {
- out = new BufferedWriter(new FileWriter(”filename”, true));
- out.write(”aString”);
- } catch (IOException e) {
- // error processing code
- } finally {
- if (out != null) {
- out.close();
- }
- }
- //该片段来自于http://www.codesnippet.cn/detail/12122012920.html
来源: http://www.codesnippet.cn/detail/12122012920.html