I LOVE YOU 韩鹏鹏

java io流

学习io流之前,先要了解File类。

  File类:代表文件和文件夹的抽象路径表示。

构造函数

  new File(String pathname);

  new File(String parent,String child);

  new File(File parent,String child);

IO:顶级抽象父类:InputStream     字节输入流、读取文件时需先关联源文件 new File();

            FileInputStream;

            FilterInputStream;

                BufferedInputStream;     BufferedInputStream bis = new BufferedInputStream(new FileInputStream("E:\\test\\1.txt");

             OutputStream   字节输出流、写出文件时需先关联目标文件 new File();

            FileOutputStream;

            FilterOutputStream;

                BufferedOutputStream;   BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("E:\\test\\1.txt");

posted @ 2017-03-20 13:51  韩鹏鹏  阅读(133)  评论(0编辑  收藏  举报