比较 ByteBuffer 内容?
Java 中比较两个 ByteBuffer 的内容以检查是否相等的最简单方法是什么?
What's the easiest way in Java to compare the contents of two ByteBuffers to check for equality?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以检查
equals()
方法也是如此。You could check the
equals()
method too.或者,使用 JDK/11,还有另一种方法来比较
ByteBuffer
与另一个。主要侧重于查找两者之间不匹配的 API 可以用作 -其文档如下:-
Alternatively, with JDK/11, there is another way of comparing a
ByteBuffer
with another. The API which primarily focusses on finding the mismatch between the two can be used as -Its documentation reads as:-