public synchronized String substring(int beginIndex, int endIndex)
public String substring(int beginIndex)
  public synchronized String substring(int beginIndex, int endIndex)  {    int len = endIndex - beginIndex;    if (beginIndex < 0 || endIndex > count || endIndex < beginIndex)      throw new StringIndexOutOfBoundsException();    if (len == 0)      return "";    // Don't copy unless substring is smaller than 1/4 of the buffer.    boolean share_buffer = ((len << 2) >= value.length);    if (share_buffer)      this.shared = true;    // Package constructor avoids an array copy.    return new String(value, beginIndex, len, share_buffer);  }