NIO

Buffer

1
2
3
4
private int mark = -1;
private int position = 0;
private int limit; //缓冲区可操作的范围
private int capacity;

子缓存区

只读缓存区

直接缓存区

内存映射文件I/O