NIO: New IO, Non-blocking IO
通道Channel
缓冲区Buffer
Buffer内部状态
- position 下一个字节写入位置
- limit 写时:最多写入量(capacity) 读时:最多读取量(position)
- capacity 缓冲区容量
ScatteringByteChannel 分散读取
GatheringByteChannel 聚集写入
MappedByteBuffer
Socket相关
Selector
待续…
NIO: New IO, Non-blocking IO
通道Channel
缓冲区Buffer
Buffer内部状态
ScatteringByteChannel 分散读取
GatheringByteChannel 聚集写入
MappedByteBuffer
Socket相关
Selector
待续…