if ((gapEnd - gapStart) < strLen)  shiftEnd(strLen + DEFAULT_BUFSIZE);
replace(where, 0, str.toCharArray(), str.length());
  public UndoableEdit insertString(int where, String str)    throws BadLocationException    {    // check arguments    int length = length();    int strLen = str.length();    if (where >= length)      throw new BadLocationException("the where argument cannot be greater"                                     + " than the content length", where);    // check if the gap is big enough to hold the string    if ((gapEnd - gapStart) < strLen)      // make room for this string and some more      shiftEnd(strLen + DEFAULT_BUFSIZE);    // are we at the gap boundary?    if (where != gapStart)      shiftGap(where);    // now we can simple copy the string into the gap and adjust the    // gap boundaries    System.arraycopy(str.toCharArray(), 0, buffer, gapStart, strLen);    gapStart += strLen;	return null;    }