CharBuffer.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(Char[]) |
Wraps a char array into a buffer. |
Wrap(String) |
Wraps a character sequence into a buffer. |
Wrap(ICharSequence, Int32, Int32) |
Wraps a character sequence into a buffer. |
Wrap(ICharSequence) |
Wraps a character sequence into a buffer. |
Wrap(String, Int32, Int32) |
Wraps a character sequence into a buffer. |
Wrap(Char[], Int32, Int32) |
Wraps a char array into a buffer. |
Wrap(Char[])
Wraps a char array into a buffer.
[Android.Runtime.Register("wrap", "([C)Ljava/nio/CharBuffer;", "")]
public static Java.Nio.CharBuffer? Wrap (char[]? array);
[<Android.Runtime.Register("wrap", "([C)Ljava/nio/CharBuffer;", "")>]
static member Wrap : char[] -> Java.Nio.CharBuffer
Parameters
- array
- Char[]
The array that will back this buffer
Returns
The new char buffer
- Attributes
Remarks
Wraps a char array into a buffer.
The new buffer will be backed by the given char 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.CharBuffer.wrap(char[])
.
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(String)
Wraps a character sequence into a buffer.
public static Java.Nio.CharBuffer? Wrap (string? csq);
static member Wrap : string -> Java.Nio.CharBuffer
Parameters
- csq
- String
The character sequence from which the new character buffer is to be created
Returns
The new character buffer
Remarks
Wraps a character sequence into a buffer.
The content of the new, read-only buffer will be the content of the given character sequence. The new buffer's capacity and limit will be csq.length()
, its position will be zero, and its mark will be undefined.
Java documentation for java.nio.CharBuffer.wrap(java.lang.CharSequence)
.
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(ICharSequence, Int32, Int32)
Wraps a character sequence into a buffer.
[Android.Runtime.Register("wrap", "(Ljava/lang/CharSequence;II)Ljava/nio/CharBuffer;", "")]
public static Java.Nio.CharBuffer? Wrap (Java.Lang.ICharSequence? csq, int start, int end);
[<Android.Runtime.Register("wrap", "(Ljava/lang/CharSequence;II)Ljava/nio/CharBuffer;", "")>]
static member Wrap : Java.Lang.ICharSequence * int * int -> Java.Nio.CharBuffer
Parameters
- csq
- ICharSequence
The character sequence from which the new character buffer is to be created
- start
- Int32
The index of the first character to be used;
must be non-negative and no larger than csq.length()
.
The new buffer's position will be set to this value.
- end
- Int32
The index of the character following the last character to be
used; must be no smaller than start
and no larger
than csq.length()
.
The new buffer's limit will be set to this value.
Returns
The new character buffer
- Attributes
Exceptions
if either start
or end
is invalid.
Remarks
Wraps a character sequence into a buffer.
The content of the new, read-only buffer will be the content of the given character sequence. The buffer's capacity will be csq.length()
, its position will be start
, its limit will be end
, and its mark will be undefined.
Java documentation for java.nio.CharBuffer.wrap(java.lang.CharSequence, 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.
Applies to
Wrap(ICharSequence)
Wraps a character sequence into a buffer.
[Android.Runtime.Register("wrap", "(Ljava/lang/CharSequence;)Ljava/nio/CharBuffer;", "")]
public static Java.Nio.CharBuffer? Wrap (Java.Lang.ICharSequence? csq);
[<Android.Runtime.Register("wrap", "(Ljava/lang/CharSequence;)Ljava/nio/CharBuffer;", "")>]
static member Wrap : Java.Lang.ICharSequence -> Java.Nio.CharBuffer
Parameters
- csq
- ICharSequence
The character sequence from which the new character buffer is to be created
Returns
The new character buffer
- Attributes
Remarks
Wraps a character sequence into a buffer.
The content of the new, read-only buffer will be the content of the given character sequence. The new buffer's capacity and limit will be csq.length()
, its position will be zero, and its mark will be undefined.
Java documentation for java.nio.CharBuffer.wrap(java.lang.CharSequence)
.
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(String, Int32, Int32)
Wraps a character sequence into a buffer.
public static Java.Nio.CharBuffer? Wrap (string? csq, int start, int end);
static member Wrap : string * int * int -> Java.Nio.CharBuffer
Parameters
- csq
- String
The character sequence from which the new character buffer is to be created
- start
- Int32
The index of the first character to be used;
must be non-negative and no larger than csq.length()
.
The new buffer's position will be set to this value.
- end
- Int32
The index of the character following the last character to be
used; must be no smaller than start
and no larger
than csq.length()
.
The new buffer's limit will be set to this value.
Returns
The new character buffer
Remarks
Wraps a character sequence into a buffer.
The content of the new, read-only buffer will be the content of the given character sequence. The buffer's capacity will be csq.length()
, its position will be start
, its limit will be end
, and its mark will be undefined.
Java documentation for java.nio.CharBuffer.wrap(java.lang.CharSequence, 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.
Applies to
Wrap(Char[], Int32, Int32)
Wraps a char array into a buffer.
[Android.Runtime.Register("wrap", "([CII)Ljava/nio/CharBuffer;", "")]
public static Java.Nio.CharBuffer? Wrap (char[]? array, int offset, int length);
[<Android.Runtime.Register("wrap", "([CII)Ljava/nio/CharBuffer;", "")>]
static member Wrap : char[] * int * int -> Java.Nio.CharBuffer
Parameters
- array
- Char[]
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 char buffer
- Attributes
Exceptions
if either start
or charCount
is invalid.
Remarks
Wraps a char array into a buffer.
The new buffer will be backed by the given char 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.CharBuffer.wrap(char[], 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.