zhyiwww
          用平實的筆,記錄編程路上的點點滴滴………
          posts - 536,comments - 394,trackbacks - 0
          <2006年6月>
          28293031123
          45678910
          11121314151617
          18192021222324
          2526272829301
          2345678

          -------------------------------------------
          崇尚原創(chuàng)精神,
          文章歡迎轉載,
          請您注明出處,
          在此特別聲明。
          版權所有@zhyiwww
          引用鏈接
          http://www.aygfsteel.com/zhyiwww

          --------------------------------------------

          常用鏈接

          留言簿(33)

          隨筆分類(626)

          朋友的博客

          最新隨筆

          搜索

          •  

          積分與排名

          • 積分 - 1561156
          • 排名 - 11

          最新評論

          閱讀排行榜

          評論排行榜

          In some applications, such as transaction processing, it is necessary to ensure that an update has been made to the disk. FileDescriptor.sync() blocks until all changes to a file are written to disk.

          				
          						    try {
                  // Open or create the output file
                  FileOutputStream os = new FileOutputStream("outfilename");
                  FileDescriptor fd = os.getFD();
              
                  // Write some data to the stream
                  byte[] data = new byte[]{(byte)0xCA, (byte)0xFE, (byte)0xBA, (byte)0xBE};
                  os.write(data);
              
                  // Flush the data from the streams and writers into system buffers.
                  // The data may or may not be written to disk.
                  os.flush();
              
                  // Block until the system buffers have been written to disk.
                  // After this method returns, the data is guaranteed to have
                  // been written to disk.
                  fd.sync();
              } catch (IOException e) {
              }
          				
          		


          |----------------------------------------------------------------------------------------|
                                     版權聲明  版權所有 @zhyiwww
                      引用請注明來源 http://www.aygfsteel.com/zhyiwww   
          |----------------------------------------------------------------------------------------|
          posted on 2006-06-13 12:01 zhyiwww 閱讀(264) 評論(0)  編輯  收藏 所屬分類: code demo -java
          主站蜘蛛池模板: 合川市| 长葛市| 渑池县| 无棣县| 仪陇县| 常熟市| 北流市| 温宿县| 尚义县| 松溪县| 琼海市| 留坝县| 渭源县| 安康市| 吴忠市| 双城市| 赣榆县| 延边| 平乡县| 岐山县| 南昌县| 孟连| 靖边县| 烟台市| 读书| 田阳县| 石景山区| 大方县| 海宁市| 凤庆县| 石首市| 华宁县| 穆棱市| 壤塘县| 克拉玛依市| 湟源县| 栾城县| 家居| 高平市| 彭水| 城步|