Method Wrap
Wrap(Byte[])
Creates a new byte buffer by wrapping the given byte array.
Calling this method has the same effect as
Wrap(array, 0, array.Length)
.
Declaration
public static ByteBuffer Wrap(byte[] array)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | array | The byte array which the new buffer will be based on |
Returns
Type | Description |
---|---|
ByteBuffer | The new byte buffer |
Wrap(Byte[], Int32, Int32)
Creates a new byte buffer by wrapping the given byte array.
The new buffer's position will be start
, limit will be
start + len
, capacity will be the length of the array.
Declaration
public static ByteBuffer Wrap(byte[] array, int start, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | array | The byte array which the new buffer will be based on. |
System.Int32 | start | The start index, must not be negative and not greater than |
System.Int32 | length | The length, must not be negative and not greater than
|
Returns
Type | Description |
---|---|
ByteBuffer | The new byte buffer |