Play Framework cara save data ke file text (how to save data on file text play framework)
save data dengan menambahkan garis baru :
Writer output = new BufferedWriter(new FileWriter("e-katalog-5/public/chat/chat-XbGjF6QV.txt", true));output.append(txtnama+" : "+txtpesan+" ; \n \r ");output.close();
save data ke file dengan replace data, tanpa garis baru :
PrintWriter writer = new PrintWriter("e-katalog-5/public/chat/chat-XbGjF6QV.txt", "UTF-8"); writer.println(txtnama+" : "+txtpesan+" \n "); writer.close();
Komentar
Posting Komentar