public class FullRestoreDataInput
extends Object



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

From class java.lang.Object

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

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.

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

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-02-26 UTC.