Share via


BackupDataInput.ReadEntityData(Byte[], Int32, Int32) Method

Definition

Read a record's raw data from the restore stream.

[Android.Runtime.Register("readEntityData", "([BII)I", "GetReadEntityData_arrayBIIHandler")]
public virtual int ReadEntityData (byte[]? data, int offset, int size);
[<Android.Runtime.Register("readEntityData", "([BII)I", "GetReadEntityData_arrayBIIHandler")>]
abstract member ReadEntityData : byte[] * int * int -> int
override this.ReadEntityData : byte[] * int * int -> int

Parameters

data
Byte[]

An allocated byte array of at least 'size' bytes

offset
Int32

Offset within the 'data' array at which the data will be placed when read from the stream

size
Int32

The number of bytes to read in this pass

Returns

The number of bytes of data read. Once all of the data for this entity has been read, further calls to this method will return zero.

Attributes

Exceptions

if an error occurred when trying to read the restore data stream

Remarks

Read a record's raw data from the restore stream. The record's header must first have been processed by the #readNextHeader() method. Multiple calls to this method may be made in order to process the data in chunks; not all of it must be read in a single call. Once all of the raw data for the current entity has been read, further calls to this method will simply return zero.

Java documentation for android.app.backup.BackupDataInput.readEntityData(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