closing_mon.enter();
if (closing)
bitfield.destroy();
else
{
final BitFlags tempHavePieces;
if (peerHavePieces ==null)
{
tempHavePieces =new BitFlags(nbPieces);
} else
{
tempHavePieces =peerHavePieces;
removeAvailability();
}
for (int i =0; i <nbPieces; i++)
{
final int index =i /8;
final int bit =7 -(i %8);
final byte bData =dataf[index];
final byte b =(byte) (bData >>bit);
if ((b &0x01) ==1)
{
tempHavePieces.set(i);
manager.updateSuperSeedPiece(this,i);
}
}
bitfield.destroy();