private void setFlag(int mask, boolean flag) throws IOException {
      mask <<= FLAGS_SHIFT;
      lockBuffer();
      try {
        int anInt = bufferWrapper.getInt(addressInBuffer);

        if (flag) {
          anInt |= mask;
        }
        else {
          anInt &= ~mask;
        }
        bufferWrapper.putInt(addressInBuffer, anInt);
      }
      finally {
        unlockBuffer();
      }
    }
private void setFlag(int mask, boolean flag)