is.copyRaw( os, size );
} else {
// data are related to our document:
// feed the new list with the GIDs
NodeId previous = null;
for( int j = 0; j < gidsCount; j++ ) {
NodeId nodeId = broker.getBrokerPool().getNodeFactory().createFromStream( previous, is );
previous = nodeId;
// add the node to the new list if it is not
// in the list of removed nodes
if( !containsNode( storedGIDList, nodeId ) ) {
newGIDList.add( nodeId );
}
}
}
}
//append the data from the new list
if( newGIDList.size() > 0 ) {
final int gidsCount = newGIDList.size();
//Don't forget this one
FastQSort.sort( newGIDList, 0, gidsCount - 1 );
os.writeInt( this.doc.getDocId() );
os.writeInt( gidsCount );
//Mark position
final int nodeIDsLength = os.position();
//Dummy value : actual one will be written below
os.writeFixedInt( 0 );
NodeId previous = null;
for( final NodeId nodeId : newGIDList ) {
try {
previous = nodeId.write( previous, os );
}