首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

android之Buffer种及子类学习

2012-08-11 
android之Buffer类及子类学习android API:http://developer.android.com/reference/java/nio/Buffer.html

android之Buffer类及子类学习

android API:http://developer.android.com/reference/java/nio/Buffer.html

缓冲区类定义在java.nio包中,基类是Buffer

Buffer 线程不安全,

capacity buffer的容量大小,可以存储的元素的量

position 当前buffer中的cursor,对buffer的读写都从cursor出执行

limit 当前存储的元素的个数,position的取值介于0到limit-1之间

mark ?被用来记录当前的position,即cursor

热点排行