Sdílet prostřednictvím


IDataInput.ReadFloat Method

Definition

Reads four input bytes and returns a float value.

[Android.Runtime.Register("readFloat", "()F", "GetReadFloatHandler:Java.IO.IDataInputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public float ReadFloat ();
[<Android.Runtime.Register("readFloat", "()F", "GetReadFloatHandler:Java.IO.IDataInputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member ReadFloat : unit -> single

Returns

the float value read.

Attributes

Exceptions

if the end of the input is reached before the read request can be satisfied.

if an I/O error occurs while reading.

Remarks

Reads four input bytes and returns a float value. It does this by first constructing an int value in exactly the manner of the readInt method, then converting this int value to a float in exactly the manner of the method Float.intBitsToFloat. This method is suitable for reading bytes written by the writeFloat method of interface DataOutput.

Java documentation for java.io.DataInput.readFloat().

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