public void postSynchChanges(final FavoriteSynchData data) {
        this.addTask(new Runnable() {
            public void run() {
                DataOutputStream out = null;
                try {
                    //the changes will be appended
                    out = openChangesFile().openDataOutputStream(true);
                    //FIXME finish this
                    for(int i=0; i < data.clientDeletedFavs.length ; i++) {
                        FavoriteInternal fav = data.clientDeletedFavs[i];
                        out.writeInt(OPERATION_SET_FAV_STATUS);
                        out.writeInt(fav.getPersistanceIndex());
                        out.writeInt(FavoriteInternal.STATUS_PHANTOM);
                    }
                    
                    for(int i=0; i < data.clientNewFavs.length ; i++) {
                        FavoriteInternal fav = data.clientNewFavs[i];
                        out.writeInt(OPERATION_SET_FAV_STATUS);
                        out.writeInt(fav.getPersistanceIndex());
                        out.writeInt(FavoriteInternal.STATUS_PHANTOM);
                    }

                    for(int i=0; i < data.serverDeletedFavs.length ; i++) {
                        FavoriteInternal fav = data.serverDeletedFavs[i];
                        out.writeInt(OPERATION_SET_FAV_STATUS);
                        out.writeInt(fav.getPersistanceIndex());
                        out.writeInt(FavoriteInternal.STATUS_PHANTOM);
                    }

                    for(int i=0; i < data.serverNewFavs.length ; i++) {
                        FavoriteInternal fav = data.serverNewFavs[i];
                        out.writeInt(OPERATION_ADD_FAV);
                        fav.setPersistanceIndex(nextIndex++);
                        //TODO status could be changed by now
                        fav.write(out);
                    }
                    
                    //at end save the crc
                    out.writeInt(OPERATION_SET_CRC);
                    out.writeUTF(data.serverCrc);
                    
                    out.flush();
                } catch (Exception e) {
                    if(LOG.isError()) {
                        LOG.error("FavoritePersistence.postSynchChanges()", e);
                    }
                    exHandler.handleSavingSynchError(e);
                } finally {
                    try {
                        if (out != null) out.close();
                    } catch (IOException e) {
                        if(LOG.isError()) {
                            LOG.error("FavoritePersistence.closeOut", e);
                        }
                    }
                }
            }        
        });
        
    }