Udostępnij za pośrednictwem


IDataOutput.WriteFloat(Single) Method

Definition

Writes a float value, which is comprised of four bytes, to the output stream.

[Android.Runtime.Register("writeFloat", "(F)V", "GetWriteFloat_FHandler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void WriteFloat (float v);
[<Android.Runtime.Register("writeFloat", "(F)V", "GetWriteFloat_FHandler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member WriteFloat : single -> unit

Parameters

v
Single

the float value to be written.

Attributes

Exceptions

if an I/O error occurs while writing.

Remarks

Writes a float value, which is comprised of four bytes, to the output stream. It does this as if it first converts this float value to an int in exactly the manner of the Float.floatToIntBits method and then writes the int value in exactly the manner of the writeInt method. The bytes written by this method may be read by the readFloat method of interface DataInput, which will then return a float equal to v.

Java documentation for java.io.DataOutput.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

See also