IO流

File f = new File(); //创建文件夹

try {
        f.createNewFile();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }//处理异常

FileWriter fw = new FileWriter(“d://abc.txt”);

BufferedWriter bw = new BufferedWriter(fw);//buff流用来缓存数据

bw.writre();//写入数据

//与上面BufferedWriter用法相同

FileReader fr = new FileReader();

BufferedReader br = new BufferedReader(fr);

FileOutputStream fo =new fo();

FileInputStream fs =new FileInputStream();

fs.read();

posted on 2017-11-16 13:01  JETIME庚  阅读(117)  评论(0编辑  收藏  举报

导航