Code example for BackupDataInputStream

Methods: getKey, size

0
    // Restore 
    // =========================================================== 
 
    @Override 
    public void restoreEntity(BackupDataInputStream data) {
        String key = data.getKey();
        Log.i(TAG, "-------------------------------------------------");
        Log.i(TAG, "--- restore Entity '" + key + "' size=" + data.size());
 
        if (backupKey.equals(key)) {
            readBackup(data);
        } 
        Log.i(TAG, "----- restoreEntity End");
        Log.i(TAG, "-------------------------------------------------");
    } 
 
    public void readBackup(InputStream data) {
        Log.d(TAG, "read Backup : " + data);
        try { 
            JsonFactory f = new JsonFactory();
            GZIPInputStream gzipIs = new GZIPInputStream(data, IS_BUFFER_SIZE);