ShortBuffer.Slice Method

Definition

Overloads

Slice()

Creates a new short buffer whose content is a shared subsequence of this buffer's content.

Slice(Int32, Int32)

Creates a new short buffer whose content is a shared subsequence of this buffer's content.

Slice()

Creates a new short buffer whose content is a shared subsequence of this buffer's content.

[Android.Runtime.Register("slice", "()Ljava/nio/ShortBuffer;", "GetSliceHandler")]
public abstract Java.Nio.ShortBuffer? Slice ();
[<Android.Runtime.Register("slice", "()Ljava/nio/ShortBuffer;", "GetSliceHandler")>]
override this.Slice : unit -> Java.Nio.ShortBuffer

Returns

The new short buffer

Attributes

Remarks

Creates a new short buffer whose content is a shared subsequence of this buffer's content.

The content of the new buffer will start at this buffer's current position. Changes to this buffer's content will be visible in the new buffer, and vice versa; the two buffers' position, limit, and mark values will be independent.

The new buffer's position will be zero, its capacity and its limit will be the number of shorts remaining in this buffer, and its mark will be undefined. The new buffer will be direct if, and only if, this buffer is direct, and it will be read-only if, and only if, this buffer is read-only.

Java documentation for java.nio.ShortBuffer.slice().

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

Slice(Int32, Int32)

Creates a new short buffer whose content is a shared subsequence of this buffer's content.

[Android.Runtime.Register("slice", "(II)Ljava/nio/ShortBuffer;", "GetSlice_IIHandler", ApiSince=34)]
public virtual Java.Nio.ShortBuffer? Slice (int index, int length);
[<Android.Runtime.Register("slice", "(II)Ljava/nio/ShortBuffer;", "GetSlice_IIHandler", ApiSince=34)>]
override this.Slice : int * int -> Java.Nio.ShortBuffer

Parameters

index
Int32

The position in this buffer at which the content of the new buffer will start; must be non-negative and no larger than #limit() limit()

length
Int32

The number of elements the new buffer will contain; must be non-negative and no larger than limit() - index

Returns

The new buffer

Attributes

Remarks

Creates a new short buffer whose content is a shared subsequence of this buffer's content.

The content of the new buffer will start at position index in this buffer, and will contain length elements. Changes to this buffer's content will be visible in the new buffer, and vice versa; the two buffers' position, limit, and mark values will be independent.

The new buffer's position will be zero, its capacity and its limit will be length, its mark will be undefined, and its byte order will be

identical to that of this buffer.

The new buffer will be direct if, and only if, this buffer is direct, and it will be read-only if, and only if, this buffer is read-only.

Added in 13.

Java documentation for java.nio.ShortBuffer.slice(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