隨筆 - 11  文章 - 33  trackbacks - 0
          <2007年8月>
          2930311234
          567891011
          12131415161718
          19202122232425
          2627282930311
          2345678

          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          •  

          最新隨筆

          最新評論

          閱讀排行榜

          評論排行榜

          這是一個簡單的往文件里寫內(nèi)容的方法:

            public void writeFile(String fileName, String content) throws Exception {
              File f = new File(fileName);
              if (f.exists()) {
                f.delete();
              }
              f.createNewFile();
              FileWriter fileWriter = new FileWriter(f);
              PrintWriter writer = new PrintWriter(fileWriter);
              writer.write(content);
              writer.flush();
              writer.close();
            }

          posted on 2007-08-24 10:43 teasp 閱讀(965) 評論(0)  編輯  收藏 所屬分類: Java學(xué)習(xí)
          主站蜘蛛池模板: 阜新| 毕节市| 内江市| 灵川县| 从化市| 合水县| 新郑市| 唐河县| 武胜县| 丘北县| 山阳县| 宜君县| 榕江县| 咸阳市| 宣威市| 巴里| 邵东县| 高青县| 莆田市| 三江| 新乡县| 康保县| 安岳县| 舒兰市| 大姚县| 吉安市| 陆良县| 苏尼特右旗| 航空| 星子县| 斗六市| 莱阳市| 福贡县| 历史| 五原县| 长乐市| 桂平市| 南雄市| 娄底市| 舞钢市| 永修县|