Compartir a través de


IObjectInput.Read Method

Definition

Overloads

Read()

Reads a byte of data.

Read(Byte[])

Reads into an array of bytes.

Read(Byte[], Int32, Int32)

Reads into an array of bytes.

Read()

Reads a byte of data.

[Android.Runtime.Register("read", "()I", "GetReadHandler:Java.IO.IObjectInputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int Read ();
[<Android.Runtime.Register("read", "()I", "GetReadHandler:Java.IO.IObjectInputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Read : unit -> int

Returns

the byte read, or -1 if the end of the stream is reached.

Attributes

Exceptions

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

Remarks

Reads a byte of data. This method will block if no input is available.

Java documentation for java.io.ObjectInput.read().

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

Read(Byte[])

Reads into an array of bytes.

[Android.Runtime.Register("read", "([B)I", "GetRead_arrayBHandler:Java.IO.IObjectInputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int Read (byte[]? b);
[<Android.Runtime.Register("read", "([B)I", "GetRead_arrayBHandler:Java.IO.IObjectInputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Read : byte[] -> int

Parameters

b
Byte[]

the buffer into which the data is read

Returns

the actual number of bytes read, -1 is returned when the end of the stream is reached.

Attributes

Exceptions

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

Remarks

Reads into an array of bytes. This method will block until some input is available.

Java documentation for java.io.ObjectInput.read(byte[]).

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

Read(Byte[], Int32, Int32)

Reads into an array of bytes.

[Android.Runtime.Register("read", "([BII)I", "GetRead_arrayBIIHandler:Java.IO.IObjectInputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int Read (byte[]? b, int off, int len);
[<Android.Runtime.Register("read", "([BII)I", "GetRead_arrayBIIHandler:Java.IO.IObjectInputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Read : byte[] * int * int -> int

Parameters

b
Byte[]

the buffer into which the data is read

off
Int32

the start offset of the data

len
Int32

the maximum number of bytes read

Returns

the actual number of bytes read, -1 is returned when the end of the stream is reached.

Attributes

Exceptions

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

Remarks

Reads into an array of bytes. This method will block until some input is available.

Java documentation for java.io.ObjectInput.read(byte[], int, int).

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