首页 > 编程语言 > 详细

java之IO

时间:2014-08-18 12:41:34      阅读:331      评论:0      收藏:0      [点我收藏+]

1 概述:

File : 硬盘上数据最常见的方式就是以文件存在的,为了方便操作这些文件,java就在IO包中提供了file类对文件本身进行封装,

        File对象可以作为参数传递给流对象的构造方法

递归: A :递归是指在方法里调用方法自身

           B: 在使用递归策略时,必须有一个明确的递归结束条件,称为递归出口

I/O:输入,输出

     A:按操作数据不同:字节流和字符流 

    B: 按数据的流向不同:输入流和输出流                                 

                                    I/O流常用的基类: 1 字节流的抽象基类

                                                                   InputStream 和OutputStream

                                                                  2 字符流的抽象基类

                                                                 Reader和Writer

                                                                 3 字符流的缓冲区

                                                                 BufferedReader和BufferedWriter

                                                                 4 字节流的缓冲区

                                                                 BufferedInputStream和BufferedOutputStream

                                                                5 标准输入输出流

                                                                 System.in的类型是InputStream

                                                                 System.out的类型是PrintStream,它是OutputStream系列的子类

                                                                 6 转换流

                                                                 InputStreamReader和OutputStreamWriter

                                                                 7 打印流

                                                                  PrintStream 和PrintWriter

                                                                8 操作对象的流

                                                                  ObjectInputStream和ObjectOutputStream

2 实例




java之IO,布布扣,bubuko.com

java之IO

原文:http://my.oschina.net/dataRunner/blog/303717

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!