finally { writeUnlock(); }
  protected void create(ElementSpec[] data)  {    try      {        // Clear content.        content.remove(0, content.length());        // Clear buffer and root element.        buffer = new ElementBuffer(createDefaultRoot());        // Insert the data.        insert(0, data);      }    catch (BadLocationException ex)      {        AssertionError err = new AssertionError("Unexpected bad location");        err.initCause(ex);        throw err;      }  }