![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
netty
文章平均质量分 76
ALL IS WELL djy
这个作者很懒,什么都没留下…
展开
-
NIO网络编程
一、阻塞模式 服务端 public class server { public static void main(String[] args) throws IOException { //用 nio 来理解阻塞模式单线程 //ByteBuffer ByteBuffer buffer = ByteBuffer.allocate(16); //1.创建服务器 ServerSocketChannel ssc = Server原创 2022-03-11 10:29:39 · 515 阅读 · 0 评论 -
NIO基础学习
Channel 一、ByteBuffer正确使用方法 一次读文件 //FileChannel //1.输入输出流。2.RandomAccessFile try (FileChannel channel = new FileInputStream("data.txt").getChannel()) { //准备缓冲区 ByteBuffer buffer = ByteBuffer.allocate(10);原创 2021-12-12 21:26:33 · 403 阅读 · 0 评论