IntBuffer.Wrap Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Wrap(Int32[]) |
Wraps an int array into a buffer. |
Wrap(Int32[], Int32, Int32) |
Wraps an int array into a buffer. |
Wrap(Int32[])
Wraps an int array into a buffer.
[Android.Runtime.Register("wrap", "([I)Ljava/nio/IntBuffer;", "")]
public static Java.Nio.IntBuffer? Wrap (int[]? array);
[<Android.Runtime.Register("wrap", "([I)Ljava/nio/IntBuffer;", "")>]
static member Wrap : int[] -> Java.Nio.IntBuffer
Parameters
- array
- Int32[]
The array that will back this buffer
Returns
The new int buffer
- Attributes
Remarks
Wraps an int array into a buffer.
The new buffer will be backed by the given int array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be array.length
, its position will be zero, and its mark will be undefined. Its #array backing array
will be the given array, and its #arrayOffset array offset>
will be zero.
Java documentation for java.nio.IntBuffer.wrap(int[])
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Wrap(Int32[], Int32, Int32)
Wraps an int array into a buffer.
[Android.Runtime.Register("wrap", "([III)Ljava/nio/IntBuffer;", "")]
public static Java.Nio.IntBuffer? Wrap (int[]? array, int offset, int length);
[<Android.Runtime.Register("wrap", "([III)Ljava/nio/IntBuffer;", "")>]
static member Wrap : int[] * int * int -> Java.Nio.IntBuffer
Parameters
- array
- Int32[]
The array that will back the new buffer
- offset
- Int32
The offset of the subarray to be used; must be non-negative and
no larger than array.length
. The new buffer's position
will be set to this value.
- length
- Int32
The length of the subarray to be used;
must be non-negative and no larger than
array.length - offset
.
The new buffer's limit will be set to offset + length
.
Returns
The new int buffer
- Attributes
Exceptions
if either start
or intCount
is invalid.
Remarks
Wraps an int array into a buffer.
The new buffer will be backed by the given int array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity will be array.length
, its position will be offset
, its limit will be offset + length
, and its mark will be undefined. Its #array backing array
will be the given array, and its #arrayOffset array offset
will be zero.
Java documentation for java.nio.IntBuffer.wrap(int[], int, int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.