286 |
{ |
{ |
287 |
if (srcOffset < 0 || srcEnd > count || srcEnd < srcOffset) |
if (srcOffset < 0 || srcEnd > count || srcEnd < srcOffset) |
288 |
throw new StringIndexOutOfBoundsException(); |
throw new StringIndexOutOfBoundsException(); |
289 |
System.arraycopy(value, srcOffset, dst, dstOffset, srcEnd - srcOffset); |
VMSystem.arraycopy(value, srcOffset, dst, dstOffset, srcEnd - srcOffset); |
290 |
} |
} |
291 |
|
|
292 |
/** |
/** |
357 |
{ |
{ |
358 |
int len = stringBuffer.count; |
int len = stringBuffer.count; |
359 |
ensureCapacity_unsynchronized(count + len); |
ensureCapacity_unsynchronized(count + len); |
360 |
System.arraycopy(stringBuffer.value, 0, value, count, len); |
VMSystem.arraycopy(stringBuffer.value, 0, value, count, len); |
361 |
count += len; |
count += len; |
362 |
} |
} |
363 |
return this; |
return this; |
397 |
if (offset < 0 || count < 0 || offset > data.length - count) |
if (offset < 0 || count < 0 || offset > data.length - count) |
398 |
throw new StringIndexOutOfBoundsException(); |
throw new StringIndexOutOfBoundsException(); |
399 |
ensureCapacity_unsynchronized(this.count + count); |
ensureCapacity_unsynchronized(this.count + count); |
400 |
System.arraycopy(data, offset, value, this.count, count); |
VMSystem.arraycopy(data, offset, value, this.count, count); |
401 |
this.count += count; |
this.count += count; |
402 |
return this; |
return this; |
403 |
} |
} |
543 |
// This will unshare if required. |
// This will unshare if required. |
544 |
ensureCapacity_unsynchronized(count); |
ensureCapacity_unsynchronized(count); |
545 |
if (count - end != 0) |
if (count - end != 0) |
546 |
System.arraycopy(value, end, value, start, count - end); |
VMSystem.arraycopy(value, end, value, start, count - end); |
547 |
count -= end - start; |
count -= end - start; |
548 |
return this; |
return this; |
549 |
} |
} |
586 |
ensureCapacity_unsynchronized(count + delta); |
ensureCapacity_unsynchronized(count + delta); |
587 |
|
|
588 |
if (delta != 0 && end < count) |
if (delta != 0 && end < count) |
589 |
System.arraycopy(value, end, value, end + delta, count - end); |
VMSystem.arraycopy(value, end, value, end + delta, count - end); |
590 |
|
|
591 |
str.getChars(0, len, value, start); |
str.getChars(0, len, value, start); |
592 |
count += delta; |
count += delta; |
673 |
|| str_offset < 0 || str_offset > str.length - len) |
|| str_offset < 0 || str_offset > str.length - len) |
674 |
throw new StringIndexOutOfBoundsException(); |
throw new StringIndexOutOfBoundsException(); |
675 |
ensureCapacity_unsynchronized(count + len); |
ensureCapacity_unsynchronized(count + len); |
676 |
System.arraycopy(value, offset, value, offset + len, count - offset); |
VMSystem.arraycopy(value, offset, value, offset + len, count - offset); |
677 |
System.arraycopy(str, str_offset, value, offset, len); |
VMSystem.arraycopy(str, str_offset, value, offset, len); |
678 |
count += len; |
count += len; |
679 |
return this; |
return this; |
680 |
} |
} |
713 |
str = "null"; |
str = "null"; |
714 |
int len = str.count; |
int len = str.count; |
715 |
ensureCapacity_unsynchronized(count + len); |
ensureCapacity_unsynchronized(count + len); |
716 |
System.arraycopy(value, offset, value, offset + len, count - offset); |
VMSystem.arraycopy(value, offset, value, offset + len, count - offset); |
717 |
str.getChars(0, len, value, offset); |
str.getChars(0, len, value, offset); |
718 |
count += len; |
count += len; |
719 |
return this; |
return this; |
764 |
if (offset < 0 || offset > count) |
if (offset < 0 || offset > count) |
765 |
throw new StringIndexOutOfBoundsException(offset); |
throw new StringIndexOutOfBoundsException(offset); |
766 |
ensureCapacity_unsynchronized(count + 1); |
ensureCapacity_unsynchronized(count + 1); |
767 |
System.arraycopy(value, offset, value, offset + 1, count - offset); |
VMSystem.arraycopy(value, offset, value, offset + 1, count - offset); |
768 |
value[offset] = ch; |
value[offset] = ch; |
769 |
count++; |
count++; |
770 |
return this; |
return this; |
960 |
: value.length); |
: value.length); |
961 |
minimumCapacity = (minimumCapacity < max ? max : minimumCapacity); |
minimumCapacity = (minimumCapacity < max ? max : minimumCapacity); |
962 |
char[] nb = new char[minimumCapacity]; |
char[] nb = new char[minimumCapacity]; |
963 |
System.arraycopy(value, 0, nb, 0, count); |
VMSystem.arraycopy(value, 0, nb, 0, count); |
964 |
value = nb; |
value = nb; |
965 |
shared = false; |
shared = false; |
966 |
} |
} |