Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
scalad committed Aug 19, 2017
1 parent 2a4b141 commit 936b3b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Java_IO/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ James Gosling的Java流模式图与水流模式图概念映射。数据源(dat

* 读写单位不同:字节流以字节(8bit)为单位,字符流以字符为单位,根据码表映射字符,一次可能读多个字节,在Java流的处理上,字符流处理的单元为 2 个字节的 Unicode 字符,分别操作字符、字符数组或字符串,而字节流处理单元为 1 个字节,操作字节和字节数组
* 处理对象不同:字节流能处理所有类型的数据(如图片、avi等),而字符流只能处理字符类型的数据
* 字节流默认是不带缓冲区的,而字符流默认是带缓冲区的
* 字节流是底层数据流,是数据有意义的最小单位。字符流是字节流的包装,底层实现是字节流

> 提醒:如果只是处理纯文本数据的话优先使用字符流,其他的使用字符流
Expand Down

0 comments on commit 936b3b5

Please sign in to comment.