FullRestoreDataInput


public class FullRestoreDataInput
extends Object

java.lang.Object
   ↳ android.app.backup.FullRestoreDataInput


Provides the interface through which a BackupAgent reads entire files from a full backup data set, via its BackupAgent.onRestoreFile(FullRestoreDataInput) method.

Summary

Public methods

long getAppVersionCode()

The version code of the app that created the backup.

String getContentVersion()

Content version set by the source device during a cross-platform transfer.

ParcelFileDescriptor getData()

Read-only file descriptor containing the file data.

File getDestination()

The file on disk to be restored with the given data.

long getMode()

The access mode to be assigned to the destination after its data is written.

long getModificationTimeSeconds()

A timestamp in the standard Unix epoch that represents the last modification time of the file when it was backed up, suitable to be assigned to the file after its data is written.

long getSize()

Size of the file in bytes.

int getTransportFlags()

Flags with additional information about the transport.

int getType()

The kind of file system object being restored.

Inherited methods

Public methods

getAppVersionCode

public long getAppVersionCode ()

The version code of the app that created the backup.

Returns
long

getContentVersion

public String getContentVersion ()

Content version set by the source device during a cross-platform transfer. Empty string if the source device did not provide a content version.

Returns
String This value cannot be null.

getData

public ParcelFileDescriptor getData ()

Read-only file descriptor containing the file data.

Returns
ParcelFileDescriptor This value cannot be null.

getDestination

public File getDestination ()

The file on disk to be restored with the given data.

Returns
File This value cannot be null.

getMode

public long getMode ()

The access mode to be assigned to the destination after its data is written. This is in the standard format used by chmod().

Returns
long

getModificationTimeSeconds

public long getModificationTimeSeconds ()

A timestamp in the standard Unix epoch that represents the last modification time of the file when it was backed up, suitable to be assigned to the file after its data is written.
Value is a non-negative timestamp measured as the number of seconds since 1970-01-01T00:00:00Z.

Returns
long Value is a non-negative timestamp measured as the number of seconds since 1970-01-01T00:00:00Z.

getSize

public long getSize ()

Size of the file in bytes.

Returns
long

getTransportFlags

public int getTransportFlags ()

Flags with additional information about the transport. The transport flags that can be set are defined in BackupAgent.

Returns
int Value is either 0 or a combination of BackupAgent.FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED, BackupAgent.FLAG_DEVICE_TO_DEVICE_TRANSFER, android.app.backup.BackupAgent.FLAG_FAKE_CLIENT_SIDE_ENCRYPTION_ENABLED, and BackupAgent.FLAG_CROSS_PLATFORM_DATA_TRANSFER_IOS

getType

public int getType ()

The kind of file system object being restored. This will be either BackupAgent.TYPE_FILE or BackupAgent.TYPE_DIRECTORY.

Returns
int Value is android.app.backup.BackupAgent.TYPE_EOF, BackupAgent.TYPE_FILE, BackupAgent.TYPE_DIRECTORY, or android.app.backup.BackupAgent.TYPE_SYMLINK