码迷,mamicode.com
首页 > 编程语言 > 详细

java之IO

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

标签:java   使用   io   文件   数据   cti   ad   sp   

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

标签:java   使用   io   文件   数据   cti   ad   sp   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!