close
簡單記錄:
private static final String FILENAME = "E:\\test\\filename.txt"; File file = new File(FILENAME); // if file doesnt exists, then create it if (!file.exists()) { file.createNewFile(); } // true = append file FileWriter fw = new FileWriter(file.getAbsoluteFile(), true); BufferedWriter bw = new BufferedWriter(fw); bw.write(data); bw.close(); fw.close();
文章標籤
全站熱搜
留言列表