Java.IO.RandomAccessFile.Read Method
Reads bytes from the current position in this file and stores them in the byte array buffer.

Syntax

[Android.Runtime.Register("read", "([B)I", "GetRead_arrayBHandler")]
public virtual int Read (byte[] buffer)

Parameters

buffer
the byte array in which to store the bytes read.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.IO.IOExceptionif this file is closed or another I/O error occurs.

Remarks

Reads bytes from the current position in this file and stores them in the byte array buffer. The maximum number of bytes read corresponds to the size of buffer. Blocks until at least one byte has been read, the end of the file is detected, or an exception is thrown. Returns the number of bytes actually read or -1 if the end of the file has been reached. See also RandomAccessFile.ReadFully(Byte[]).

[Android Documentation]

Requirements

Namespace: Java.IO
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1