69

IO与NIO-12212886-51CTO博客

 6 years ago
source link: http://blog.51cto.com/12222886/2070597
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
其实并不难就是类比较多。。io与nio的区别(1)io面向流,而nio面向缓冲 java IO面向流意味着每次从流中读一个或多个字节,直至读取所有字节,它们没有被缓存在任何地方,此外,他不能前后移动流中的数据,如果需要前后移动缓存中的数据,需要先将它缓存到一个缓存区。 java NIO的缓冲导向方法略有不同,数据读取到一个它稍后处理的缓冲区,需要时可在缓冲区中前后移动,这就增加了处理过程中的灵活性

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK