伊图教程网[www.etoow.com]
http://www.etoow.com/html/2008-02/1203320270.html
RandomAccessFile rf2 = new RandomAccessFile("d:\\jeru.txt","rw");
rf2.seek(rf2.length());
rf2.writeBytes("lala,append line"+"\n");
rf2.close();
RandomAccessFile rf3 = new RandomAccessFile("d:\\jeru.txt","r");
while ((record = rf3.readLine()) != null) {
i ++;
System.out.println("Value "+i+":"+record);
}
rf3.close();
}catch(Exception e){}
}
}
利用RamdonAccessFile来实现文件的追加
'http://www.etoow.com/html/2008-02/1203320270.html