IT. Expert System.

Android Reference

BackupHelper


android.app.backup

Interface BackupHelper

    • Method Detail

      • performBackup

        void performBackup(ParcelFileDescriptor oldState,
                         BackupDataOutput data,
                         ParcelFileDescriptor newState)
        Based on oldState, determine which of the files from the application's data directory need to be backed up, write them to data, and fill in newState with the state as it exists now.

        Implementing this method is much like implementing onBackup() — the method parameters are the same. When this method is invoked the oldState descriptor points to the beginning of the state data written during this helper's previous backup operation, and the newState descriptor points to the file location at which the helper should write its new state after performing the backup operation.

        Note: The helper should not close or seek either the oldState or the newState file descriptors.

        Parameters:
        oldState - An open, read-only ParcelFileDescriptor pointing to the last backup state provided by the application. May be null, in which case no prior state is being provided and the application should perform a full backup.
        data - An open, read/write BackupDataOutput pointing to the backup data destination. Typically the application will use backup helper classes to write to this file.
        newState - An open, read/write ParcelFileDescriptor pointing to an empty file. The application should record the final backup state here after writing the requested data to the data output stream.
      • restoreEntity

        void restoreEntity(BackupDataInputStream data)
        Called by BackupAgentHelper to restore a single entity from the restore data set. This method will be called for each entity in the data set that belongs to this handler.

        Note: Do not close the data stream. Do not read more than size() bytes from data.

        Parameters:
        data - An open BackupDataInputStream from which the backup data can be read.
      • writeNewStateDescription

        void writeNewStateDescription(ParcelFileDescriptor newState)
        Called by BackupAgentHelper after a restore operation to write the backup state file corresponding to the data as processed by the helper. The data written here will be available to the helper during the next call to its performBackup() method.

        This method will be called even if the handler's restoreEntity() method was never invoked during the restore operation.

        Note: The helper should not close or seek the newState file descriptor.

        Parameters:
        newState - A ParcelFileDescriptor to which the new state will be written.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 164 / . Delta: 0.03633 с