code: public synchronized void clear() throws IOException {
      // Commit the header.
      writeHeader(INITIAL_LENGTH, 0, 0, 0);
  
      // Zero out data.
      raf.seek(HEADER_LENGTH);
      raf.write(ZEROES, 0, INITIAL_LENGTH - HEADER_LENGTH);
  
      elementCount = 0;
      first = Element.NULL;
      last = Element.NULL;
      if (fileLength > INITIAL_LENGTH) setLength(INITIAL_LENGTH);
      fileLength = INITIAL_LENGTH;
    }
docs: Clears this queue. Truncates the file to the initial size.