Dela via


IDataInput.ReadInt Method

Definition

Reads four input bytes and returns an int value.

[Android.Runtime.Register("readInt", "()I", "GetReadIntHandler:Java.IO.IDataInputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int ReadInt ();
[<Android.Runtime.Register("readInt", "()I", "GetReadIntHandler:Java.IO.IDataInputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member ReadInt : unit -> int

Returns

the int 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 an int value. Let a-d be the first through fourth bytes read. The value returned is:

{@code
            (((a & 0xff) << 24) | ((b & 0xff) << 16) |
             ((c & 0xff) <<  8) | (d & 0xff))
            }

This method is suitable for reading bytes written by the writeInt method of interface DataOutput.

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

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