
NIO
文章平均质量分 77
restart_chikhoo
新的起点,重新起航~~
展开
-
NIO解读之ServerSocketChannel
ServerSocketChannel的类结构图: 上文说了多路复用器Selector,这篇文章来解读ServerSocketChannel类,首先看创建ServerSocketChannel类的open方法, public static ServerSocketChannel open() throws IOException { return SelectorPr原创 2015-03-21 14:40:59 · 1276 阅读 · 0 评论 -
NIO解读之多路复用器Selector
Selector类的结构图如下所示: Selector是JDK的NIO中最重要的类之一,当我们通过Selector.open()方法打开一个多路复用器的时候实际上执行的open方法为 public static Selector open() throws IOException { return SelectorProvider.provider().openSel原创 2015-03-20 16:26:01 · 6097 阅读 · 0 评论