}
  protected void shiftGap(int newGapStart)  {    int newGapEnd = newGapStart + (gapEnd - gapStart);    if (newGapStart == gapStart)      return;    else if (newGapStart < gapStart)      {        System.arraycopy(buffer, newGapStart, buffer, newGapEnd,                         gapStart - newGapStart);        gapStart = newGapStart;        gapEnd = newGapEnd;      }    else      {        System.arraycopy(buffer, gapEnd, buffer, gapStart,                         newGapStart - gapStart);        gapStart = newGapStart;        gapEnd = newGapEnd;      }  }