ShortBuffer.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(Int16[]) |
Wraps a short array into a buffer. |
Wrap(Int16[], Int32, Int32) |
Wraps a short array into a buffer. |
Wrap(Int16[])
Wraps a short array into a buffer.
[Android.Runtime.Register("wrap", "([S)Ljava/nio/ShortBuffer;", "")]
public static Java.Nio.ShortBuffer? Wrap (short[]? array);
[<Android.Runtime.Register("wrap", "([S)Ljava/nio/ShortBuffer;", "")>]
static member Wrap : int16[] -> Java.Nio.ShortBuffer
Parameters
- array
- Int16[]
The array that will back this buffer
Returns
The new short buffer
- Attributes
Remarks
Wraps a short array into a buffer.
The new buffer will be backed by the given short 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.ShortBuffer.wrap(short[])
.
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(Int16[], Int32, Int32)
Wraps a short array into a buffer.
[Android.Runtime.Register("wrap", "([SII)Ljava/nio/ShortBuffer;", "")]
public static Java.Nio.ShortBuffer? Wrap (short[]? array, int offset, int length);
[<Android.Runtime.Register("wrap", "([SII)Ljava/nio/ShortBuffer;", "")>]
static member Wrap : int16[] * int * int -> Java.Nio.ShortBuffer
Parameters
- array
- Int16[]
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 short buffer
- Attributes
Exceptions
if either start
or shortCount
is invalid.
Remarks
Wraps a short array into a buffer.
The new buffer will be backed by the given short 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.ShortBuffer.wrap(short[], 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.