aijava

          welcome to my online log ! open java new world! Taste java charm........
          posts - 1, comments - 4, trackbacks - 0, articles - 42
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          java基礎學習16(java.io.DataOutputStream)

          Posted on 2006-11-12 23:21 閱讀(589) 評論(0)  編輯  收藏 所屬分類: java基礎學習系列
          import? java.io.DataOutputStream;
          import? java.io.FileOutputStream;

          public?class? MainClass? {

          ?? public?static? void? main ( String?args [])?{
          ???? try? {

          ?????? FileOutputStream?fos?=? new? FileOutputStream ("fileName" ) ;

          ?????? DataOutputStream?dos?=? new? DataOutputStream ( fos ) ;

          ?????? dos.writeBoolean ( false ) ;
          ?????? dos.writeByte ( Byte.MAX_VALUE ) ;
          ?????? dos.writeChar ( 'A' ) ;
          ?????? dos.writeDouble ( Double.MAX_VALUE ) ;
          ?????? dos.writeFloat ( Float.MAX_VALUE ) ;
          ?????? dos.writeInt ( Integer.MAX_VALUE ) ;
          ?????? dos.writeLong ( Long.MAX_VALUE ) ;
          ?????? dos.writeShort ( Short.MAX_VALUE ) ;

          ?????? fos.close () ;
          ???? }? catch? ( Exception?e )?{
          ?????? System.out.println ( "Exception:?"? +?e ) ;
          ???? }
          ?? }
          }??
          http://freehost13.websamba.com
          主站蜘蛛池模板: 绥德县| 伊川县| 聊城市| 濮阳市| 博客| 长武县| 肥乡县| 大石桥市| 南郑县| 天祝| 天镇县| 彭泽县| 凤山县| 西和县| 武定县| 万源市| 曲靖市| 南岸区| 寿宁县| 五常市| 铁岭市| 乌兰浩特市| 辉县市| 灯塔市| 榆林市| 铅山县| 高邑县| 宁远县| 屏东市| 绥江县| 仪征市| 余庆县| 城步| 新田县| 绥阳县| 乳源| 潞城市| 晋城| 当涂县| 太康县| 韶关市|