code: public void truncate(long size) throws IOException {
          super.truncate(size);
          if (size == 0) {
              synchronized (this) {
                  mTranCount = 0;
                  // Clear the bit to indicate clean.
                  mBitlist.clear(mBitlistPos);
              }
          }
      }
docs: Truncating the file to zero restores it to a clean state.