摘要: 这个把source缓冲区中的数据写到当前缓冲区的方法是比较经典的: if (source == null) throw new IllegalArgumentException("source == null"); //这个判断是防止自己把数据写到自身这个Buffer中 if (source == 阅读全文
posted @ 2023-04-12 11:41 lianzhen 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 1、Segment是Buffer缓冲区存储数据的基本单位,每个Segment能存储的最大字节是8192也就是8k的数据 /** The size of all segments in bytes. */ static final int SIZE = 8192; 2、SHARE_MINIMUM是用来 阅读全文
posted @ 2023-04-12 11:03 lianzhen 阅读(62) 评论(0) 推荐(0) 编辑