Java implemention of ResourceSync