Language

RandomAccessFile.ReadAsync Method

Definition

Overloads

Name Description
ReadAsync(Byte[], Int32, Int32)

Reads file bytes into a buffer range in a task.

ReadAsync()

Reads one byte from the file in a task.

ReadAsync(Byte[])

Reads file bytes into a buffer in a task.

ReadAsync(Byte[], Int32, Int32)

Reads file bytes into a buffer range in a task.

public System.Threading.Tasks.Task<int> ReadAsync(byte[]? b, int off, int len);
member this.ReadAsync : byte[] * int * int -> System.Threading.Tasks.Task<int>

Parameters

b
Byte[]

The buffer that receives the bytes read.

off
Int32

The buffer index at which received bytes are stored.

len
Int32

The maximum number of bytes to read.

Returns

A task whose result is the byte count, or -1 to report the end of the file.

Remarks

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

ReadAsync()

Reads one byte from the file in a task.

public System.Threading.Tasks.Task<int> ReadAsync();
member this.ReadAsync : unit -> System.Threading.Tasks.Task<int>

Returns

A task whose result is the next byte as an integer, or -1 at the end of the file.

Remarks

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

ReadAsync(Byte[])

Reads file bytes into a buffer in a task.

public System.Threading.Tasks.Task<int> ReadAsync(byte[]? b);
member this.ReadAsync : byte[] -> System.Threading.Tasks.Task<int>

Parameters

b
Byte[]

The buffer that receives bytes read from the file.

Returns

A task whose result is the byte count, or -1 to report the end of the file.

Remarks

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