Udostępnij za pośrednictwem


ByteBuffer.PutFloat Method

Definition

Overloads

PutFloat(Single)

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

PutFloat(Int32, Single)

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

PutFloat(Single)

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

[Android.Runtime.Register("putFloat", "(F)Ljava/nio/ByteBuffer;", "GetPutFloat_FHandler")]
public abstract Java.Nio.ByteBuffer PutFloat (float value);
[<Android.Runtime.Register("putFloat", "(F)Ljava/nio/ByteBuffer;", "GetPutFloat_FHandler")>]
abstract member PutFloat : single -> Java.Nio.ByteBuffer

Parameters

value
Single

The float value to be written

Returns

This buffer

Attributes

Exceptions

if position is greater than limit - 4.

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

Remarks

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

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

Java documentation for java.nio.ByteBuffer.putFloat(float).

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

PutFloat(Int32, Single)

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

[Android.Runtime.Register("putFloat", "(IF)Ljava/nio/ByteBuffer;", "GetPutFloat_IFHandler")]
public abstract Java.Nio.ByteBuffer PutFloat (int index, float value);
[<Android.Runtime.Register("putFloat", "(IF)Ljava/nio/ByteBuffer;", "GetPutFloat_IFHandler")>]
abstract member PutFloat : int * single -> Java.Nio.ByteBuffer

Parameters

index
Int32

The index at which the bytes will be written

value
Single

The float 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 float value&nbsp;&nbsp;(optional operation).

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

Java documentation for java.nio.ByteBuffer.putFloat(int, float).

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