Re: [問題] 把文字加到txt檔的後面
※ 引述《Jnaive.bbs@ptt.cc (嘿嘿)》之銘言:
> 請問一下如何把文字加在原本有的檔案後面
> 目前我用的方法是
> File theFile = new File("file_name.txt");
> RandomAccessFile Rw = new RandomAccessFile(theFile, "rw");
> Rw.seek( Rw.length() );
把\r\n換成System.getProperty("line.separator"),這樣應該就可以了
--
╭┼ Origin: 台中師院˙清蘅夢土 mse.ntctc.edu.tw
┼┘ Author: chuangjo 從 219-81-255-142.static.tfn.net.tw 發表
討論串 (同標題文章)
完整討論串 (本文為第 3 之 3 篇):
java 近期熱門文章
PTT數位生活區 即時熱門文章