boolean moveToBuddy =
subtree.isChildOf(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN) && subtree.size() > 1;
// store new state
Fqn fqn = null;
while(in.available() > 0)
{
nd=(NodeData)in.readObject();
if (moveToBuddy)
fqn = BuddyManager.getBackupFqn(subtree, nd.fqn);