System.arraycopy(this.content, 0, temp, 0, where); System.arraycopy(this.content, where + nitems, temp, where, this.content.length - where - nitems); this.content = new char[temp.length];  System.arraycopy(temp, 0, this.content, 0, this.content.length);
replace(where, nitems, EMPTY);
  public UndoableEdit remove(int where, int nitems) throws BadLocationException  {    checkLocation(where, nitems + 1);    char[] temp = new char[(this.content.length - nitems)];    this.count = this.count - nitems;    RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where,         nitems));    // Copy array.    System.arraycopy(this.content, 0, temp, 0, where);    System.arraycopy(this.content, where + nitems, temp, where,         this.content.length - where - nitems);    this.content = new char[temp.length];    // Then copy the result in the original char array.    System.arraycopy(temp, 0, this.content, 0, this.content.length);    // Move all the positions.    Vector refPos = getPositionsInRange(this.positions, where,         this.content.length + nitems - where);    Iterator iter = refPos.iterator();    while (iter.hasNext())      {        StickyPosition p = (StickyPosition)iter.next();        int result = p.getOffset() - nitems;        p.setOffset(result);        if (result < 0)          this.positions.remove(p);      }    return rundo;  }