docs: public void clear() throws IOException {
      if (closed) throw new IllegalStateException("closed");
  
      // Commit the header.
      writeHeader(INITIAL_LENGTH, 0, 0, 0);
  
      if (zero) {
        // Zero out data.
        raf.seek(headerLength);
        raf.write(ZEROES, 0, INITIAL_LENGTH - headerLength);
      }
  
      elementCount = 0;
      first = Element.NULL;
      last = Element.NULL;
      if (fileLength > INITIAL_LENGTH) setLength(INITIAL_LENGTH);
      fileLength = INITIAL_LENGTH;
      modCount++;
    }