看板java
标 题Re: [问题] 把文字加到txt档的後面
发信站清蘅梦土 (Sun Mar 26 00:03:45 2006)
转信站ptt!ctu-reader!news.nctu!NTCTCTMSE
※ 引述《[email protected] (嘿嘿)》之铭言:
> 请问一下如何把文字加在原本有的档案後面
> 目前我用的方法是
> File theFile = new File("file_name.txt");
> RandomAccessFile Rw = new RandomAccessFile(theFile, "rw");
> Rw.seek( Rw.length() );
把\r\n换成System.getProperty("line.separator"),这样应该就可以了
--
╭┼ Or
igin:
台中师院˙清蘅梦土 mse.ntctc.edu.tw
┼┘ A
uthor:
chuangjo 从 219-81-255-142.static.tfn.net.tw 发表