`

Buffer的基本用法

 
阅读更多

1、对buffe.put(**)后,都要buffer.flip();使limit设为当前位置(buffer最后位),且把position设为0。

 

2、byte[] b = new byte[buffer.remaining()];

把buffer.长度作为新new的b的长度

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics