
Netty学习之路
马早的博客
这个作者很懒,什么都没留下…
展开
-
Channel和Buffer的使用
使用ByteBuffer和Channel将字符串写入文件 public class NIOFileChannel01 { public static void main(String[] args) throws Exception{ String str = "hello,Mz"; //创建一个输出流->channel FileOutputStream fileOutputStream = new FileOutputStream("f:\原创 2020-12-14 23:09:51 · 478 阅读 · 0 评论 -
Netty学习01-通道和缓冲区的使用
package com.atguigu; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; public class NIOFileChannel01 { public static void main(String[]原创 2020-05-09 12:16:51 · 452 阅读 · 0 评论