public static ByteBuffer wrap (byte[] array)//这个函数是下个函数的简写特殊版
介绍:Calling this method has the same effect as wrap(array, 0, array.length).
public static ByteBuffer wrap (byte[] array, int start, int byteCount)
The new buffer's position will be start, limit will be start + byteCount, capacity will be the length of the array.
Parameters
| array | the byte array which the new buffer will be based on. |
|---|---|
| start | the start index, must not be negative and not greater than array.length. |
| byteCount | the length, must not be negative and not greater than array.length - start. |
本文详细介绍了Java中ByteBuffer.wrap方法的使用方式及其参数含义。该方法可以将已有的字节数组包装成ByteBuffer对象,方便进行进一步的数据操作。具体包括如何指定起始位置和字节数,以及这些参数的有效范围。
1134

被折叠的 条评论
为什么被折叠?



