Files
interview/10-中间件/Buffer核心属性.md
yasinshaw fabdaaee1f docs: 优化Java NIO文档图解,使用Excalidraw可视化
- 将ASCII文字图替换为专业的Excalidraw图表
- 新增4个可视化图表:三大核心组件架构、Selector多路复用模型、Buffer核心属性、零拷贝原理对比
- 图表使用配色方案区分不同组件(蓝色-Channel, 绿色-Buffer, 橙色-Selector)
- 在Obsidian中可通过![[...]]语法直接嵌入查看
2026-03-08 11:25:54 +08:00

14 KiB

excalidraw-plugin, tags
excalidraw-plugin tags
parsed
excalidraw

==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving'

Excalidraw Data

Text Elements

%%

Drawing

{
  "type": "excalidraw",
  "version": 2,
  "source": "https://github.com/zsviczian/obsidian-excalidraw-plugin",
  "elements": [
    {
      "id": "title",
      "type": "text",
      "x": 350,
      "y": 30,
      "width": 500,
      "height": 35,
      "angle": 0,
      "strokeColor": "#1e40af",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 1,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "Buffer 核心属性与操作方法",
      "fontSize": 28,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "Buffer 核心属性与操作方法",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "buffer-title",
      "type": "text",
      "x": 480,
      "y": 100,
      "width": 240,
      "height": 30,
      "angle": 0,
      "strokeColor": "#1e40af",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 2,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "Buffer 内存布局",
      "fontSize": 24,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "Buffer 内存布局",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "processed-box",
      "type": "rectangle",
      "x": 150,
      "y": 160,
      "width": 200,
      "height": 80,
      "angle": 0,
      "strokeColor": "#2f9e44",
      "backgroundColor": "#b2f2bb",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {"type": 3},
      "seed": 3,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "processed-label",
      "type": "text",
      "x": 200,
      "y": 185,
      "width": 100,
      "height": 30,
      "angle": 0,
      "strokeColor": "#2b8a3e",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 4,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "已处理数据",
      "fontSize": 20,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "已处理数据",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "readwrite-box",
      "type": "rectangle",
      "x": 360,
      "y": 160,
      "width": 280,
      "height": 80,
      "angle": 0,
      "strokeColor": "#1971c2",
      "backgroundColor": "#a5d8ff",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {"type": 3},
      "seed": 5,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "readwrite-label",
      "type": "text",
      "x": 450,
      "y": 185,
      "width": 100,
      "height": 30,
      "angle": 0,
      "strokeColor": "#1864ab",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 6,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "可读/写数据",
      "fontSize": 20,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "可读/写数据",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "inaccessible-box",
      "type": "rectangle",
      "x": 650,
      "y": 160,
      "width": 200,
      "height": 80,
      "angle": 0,
      "strokeColor": "#e03131",
      "backgroundColor": "#ffc9c9",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {"type": 3},
      "seed": 7,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "inaccessible-label",
      "type": "text",
      "x": 690,
      "y": 185,
      "width": 120,
      "height": 30,
      "angle": 0,
      "strokeColor": "#c92a2a",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 8,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "不可访问",
      "fontSize": 20,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "不可访问",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "mark-label",
      "type": "text",
      "x": 150,
      "y": 255,
      "width": 70,
      "height": 25,
      "angle": 0,
      "strokeColor": "#f59e0b",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 9,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "mark",
      "fontSize": 20,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "mark",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "position-label",
      "type": "text",
      "x": 360,
      "y": 255,
      "width": 100,
      "height": 25,
      "angle": 0,
      "strokeColor": "#3b82f6",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 10,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "position",
      "fontSize": 20,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "position",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "limit-label",
      "type": "text",
      "x": 640,
      "y": 255,
      "width": 70,
      "height": 25,
      "angle": 0,
      "strokeColor": "#e03131",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 11,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "limit",
      "fontSize": 20,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "limit",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "capacity-label",
      "type": "text",
      "x": 850,
      "y": 255,
      "width": 100,
      "height": 25,
      "angle": 0,
      "strokeColor": "#7c3aed",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 12,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "capacity",
      "fontSize": 20,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "capacity",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "methods-box",
      "type": "rectangle",
      "x": 150,
      "y": 320,
      "width": 700,
      "height": 200,
      "angle": 0,
      "strokeColor": "#5c7cfa",
      "backgroundColor": "#d0ebff",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {"type": 3},
      "seed": 13,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "methods-title",
      "type": "text",
      "x": 410,
      "y": 335,
      "width": 180,
      "height": 30,
      "angle": 0,
      "strokeColor": "#364fc7",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 14,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "核心操作方法",
      "fontSize": 24,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "核心操作方法",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "method1",
      "type": "text",
      "x": 180,
      "y": 385,
      "width": 300,
      "height": 50,
      "angle": 0,
      "strokeColor": "#374151",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 15,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "mark「」\n标记当前 position 位置",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "left",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "mark「」\n标记当前 position 位置",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "method2",
      "type": "text",
      "x": 510,
      "y": 385,
      "width": 300,
      "height": 50,
      "angle": 0,
      "strokeColor": "#374151",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 16,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "reset「」\n恢复到 mark 位置",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "left",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "reset「」\n恢复到 mark 位置",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "method3",
      "type": "text",
      "x": 180,
      "y": 450,
      "width": 300,
      "height": 50,
      "angle": 0,
      "strokeColor": "#374151",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 17,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "clear「」\nposition=0, limit=capacity",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "left",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "clear「」\nposition=0, limit=capacity",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "method4",
      "type": "text",
      "x": 510,
      "y": 450,
      "width": 300,
      "height": 50,
      "angle": 0,
      "strokeColor": "#374151",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": null,
      "seed": 18,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "flip「」\nlimit=position, position=0",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "left",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "flip「」\nlimit=position, position=0",
      "autoResize": true,
      "lineHeight": 1.25
    }
  ],
  "appState": {
    "gridSize": null,
    "viewBackgroundColor": "#ffffff"
  },
  "files": {}
}

%%