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 . |