Share via


DataOutputStream.WriteFloat(Single) Method

Definition

Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the underlying output stream as a 4-byte quantity, high byte first.

[Android.Runtime.Register("writeFloat", "(F)V", "")]
public void WriteFloat (float v);
[<Android.Runtime.Register("writeFloat", "(F)V", "")>]
abstract member WriteFloat : single -> unit
override this.WriteFloat : single -> unit

Parameters

v
Single

a float value to be written.

Implements

Attributes

Exceptions

Remarks

Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the underlying output stream as a 4-byte quantity, high byte first. If no exception is thrown, the counter written is incremented by 4.

Java documentation for java.io.DataOutputStream.writeFloat(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