ByteBuffer.PutShort Method

Definition

Overloads

PutShort(Int16)

Relative put method for writing a short value  (optional operation).

PutShort(Int32, Int16)

Absolute put method for writing a short value  (optional operation).

PutShort(Int16)

Relative put method for writing a short value  (optional operation).

[Android.Runtime.Register("putShort", "(S)Ljava/nio/ByteBuffer;", "GetPutShort_SHandler")]
public abstract Java.Nio.ByteBuffer PutShort (short value);
[<Android.Runtime.Register("putShort", "(S)Ljava/nio/ByteBuffer;", "GetPutShort_SHandler")>]
abstract member PutShort : int16 -> Java.Nio.ByteBuffer

Parameters

value
Int16

The short value to be written

Returns

This buffer

Attributes

Exceptions

if position is greater than limit - 2.

if no changes may be made to the contents of this buffer.

Remarks

Relative put method for writing a short value&nbsp;&nbsp;(optional operation).

Writes two bytes containing the given short value, in the current byte order, into this buffer at the current position, and then increments the position by two.

Java documentation for java.nio.ByteBuffer.putShort(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

PutShort(Int32, Int16)

Absolute put method for writing a short value&nbsp;&nbsp;(optional operation).

[Android.Runtime.Register("putShort", "(IS)Ljava/nio/ByteBuffer;", "GetPutShort_ISHandler")]
public abstract Java.Nio.ByteBuffer PutShort (int index, short value);
[<Android.Runtime.Register("putShort", "(IS)Ljava/nio/ByteBuffer;", "GetPutShort_ISHandler")>]
abstract member PutShort : int * int16 -> Java.Nio.ByteBuffer

Parameters

index
Int32

The index at which the bytes will be written

value
Int16

The short value to be written

Returns

This buffer

Attributes

Exceptions

if index is invalid.

if no changes may be made to the contents of this buffer.

Remarks

Absolute put method for writing a short value&nbsp;&nbsp;(optional operation).

Writes two bytes containing the given short value, in the current byte order, into this buffer at the given index.

Java documentation for java.nio.ByteBuffer.putShort(int, 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