ByteBuffer的限制和容量有什么区别? [英] What is the difference between limit and capacity in ByteBuffer?
本文介绍了ByteBuffer的限制和容量有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Java的限制和容量之间有什么区别java.nio.ByteBuffer ?
推荐答案
最好的例证 HERE in this article :它们主要因模式而异,
Its best illustrated HERE in this article: They are mainly different depending on the mode,
- 在写入模式中,容量和限制是相同的。
- 但在读取模式下限制意味着您可以从数据中读取多少数据
- In Write Mode, Capacity and Limit are Same.
- But in Read mode Limit means the limit of how much data you can read from the data
这篇关于ByteBuffer的限制和容量有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文