Java NIO

作者: jackLee | 来源:发表于2016-01-19 11:03 被阅读165次
Paste_Image.png Paste_Image.png Paste_Image.png
以上三张图分别是:channel和buffer的关系,Selector和Channel的关系,Buffer的读写操作属性变化。

--来自IBM的教程:
http://www.ibm.com/developerworks/cn/education/java/j-nio/j-nio.html

--英文的NIO教程
http://tutorials.jenkov.com/java-nio/index.html
以上两个链接已经总结的十分好了,需要的时候点击查看就ok

Java NIO :
三大特性:
1.Java NIO:** Channels and Buffers**:Data is always read from a channel into a buffer, or written from a buffer to a channel
2.Java NIO: Non-blocking IO :While the channel reads data into the buffer, the thread can do something else
3.Java NIO: Selectors:a single thread can monitor multiple channels for data.

三大核心Class:##

-Buffers
-Channels
-Selectors

--Channels and Buffers:
Typically, all IO in NIO starts with a Channel.
Java NIO: Channels read data into Buffers, and Buffers write data into Channels.


扫描关注我哦

我的公众号

相关文章

网友评论

    本文标题:Java NIO

    本文链接:https://www.haomeiwen.com/subject/xpwkkttx.html