次の方法で共有


RandomAccessFile.ReadFloat Method

Definition

Reads a float from this file.

[Android.Runtime.Register("readFloat", "()F", "")]
public float ReadFloat ();
[<Android.Runtime.Register("readFloat", "()F", "")>]
abstract member ReadFloat : unit -> single
override this.ReadFloat : unit -> single

Returns

the next four bytes of this file, interpreted as a float.

Implements

Attributes

Exceptions

if the end of this file is detected.

if this file is closed or another I/O error occurs.

Remarks

Reads a float from this file. This method reads an int value, starting at the current file pointer, as if by the readInt method and then converts that int to a float using the intBitsToFloat method in class Float.

This method blocks until the four bytes are read, the end of the stream is detected, or an exception is thrown.

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