StringBuffer.getChars

StringBuffer.getChars

Class Overview | Class Members | This Package | All Packages

Syntax
public synchronized void getChars( int srcBegin, int srcEnd, char dst[], int dstBegin )
Parameters
srcBegin
start copying at this offset in the string buffer.
srcEnd
stop copying at this offset in the string buffer.
dst
the array to copy the data into.
dstBegin
offset into dst.
Description
Characters are copied from this string buffer into the destination character array dst. The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1. The total number of characters to be copied is srcEnd-srcBegin. The characters are copied into the subarray of dst starting at index dstBegin and ending at index:

     dstbegin + (srcEnd-srcBegin) - 1
 

Exceptions
StringIndexOutOfBoundsException if there is an invalid index into the buffer.