首 页 ASP ASP.NET PHP JSP Ajax DIV+CSS JavaScript XML C#
MySQL MSSQL Access Oracle Linux Server 电脑技巧 网络安全 建站经验 其它

利用RamdonAccessFile来实现文件的追加

整理日期:2008年02月18日 【字体:


伊图教程网[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){}
}
}
Tags:
利用RamdonAccessFile来实现文件的追加
'http://www.etoow.com/html/2008-02/1203320270.html
1
 
信息搜索
  
联系我们关于本站广告服务设为首页 收藏本站友情链接网站地图
Copyright © Etoow.com Inc. All Rights Reserved