Skip to content

docs: 添加与 Java ByteBuffer 的接口对比#16

Closed
CPythoner wants to merge 1 commit intomasterfrom
docs/update-readme
Closed

docs: 添加与 Java ByteBuffer 的接口对比#16
CPythoner wants to merge 1 commit intomasterfrom
docs/update-readme

Conversation

@CPythoner
Copy link
Copy Markdown
Owner

更新内容

在 README 中添加了 Java ByteBuffer 与 C++ 实现的接口对比表格。

对比内容

  • 创建方法 - 构造函数与 Java allocate/wrap 的对应关系
  • 读取方法 (Get) - 所有 get 方法的对应关系
  • 写入方法 (Put) - 所有 put 方法的对应关系
  • 状态管理方法 - clear, flip, rewind, mark, reset, compact
  • 属性访问方法 - capacity, position, limit, remaining, hasRemaining
  • 其他方法 - equals, duplicate
  • C++ 特有功能 - 移动语义、自动扩容、命名参数、printInfo

说明

本实现参考了 Java NIO 的 ByteBuffer 类,核心接口保持一致,同时添加了 C++ 特有的功能(如移动语义、自动扩容等)。

在 README 中添加 Java ByteBuffer 与 C++ 实现的接口对比表格:
- 创建方法对比
- 读取方法 (Get) 对比
- 写入方法 (Put) 对比
- 状态管理方法对比
- 属性访问方法对比
- 其他方法对比
- C++ 特有功能说明
@CPythoner CPythoner closed this Apr 4, 2026
@CPythoner CPythoner deleted the docs/update-readme branch April 4, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant