9.Nio三个重要变量

A container for data of a specific primitive type.A buffer is a linear, finite sequence of elements of a specific primitive type. Aside from its content, the essential properties of a buffer are its capacity, limit, and position:

  • A buffer's capacity is the number of elements it contains. The capacity of a buffer is never negative and never changes.
  • A buffer's limit is the index of the first element that should not be read or written. A buffer's limit is never * negative and is never greater than its capacity.
  • A buffer's position is the index of the next element to be read or written. A buffer's position is never negative and is never greater than its limit.


    image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容