CharArrayAccessible (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.codehaus.groovy.grails.support.encoding
[Java] Interface CharArrayAccessible

    public interface CharArrayAccessible

Marker interface for telling that the underlying char array is directly accessible This interface is missing from the JVM although String, StringBuffer and StringBuilder all have this method.

Authors:
  Lari Hotari

Since:
  2.3

Method Summary
`void` | `getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)` Characters are copied from this sequence into the destination character array `dst`.

Method Detail

### getChars

    public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)

  Characters are copied from this sequence 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

  throws:
    NullPointerException if `dst` is `null`.
  throws:
    IndexOutOfBoundsException if any of the following is true:
    - `srcBegin` is negative
    - `dstBegin` is negative
    - the `srcBegin` argument is greater than the `srcEnd` argument.
    - `srcEnd` is greater than `this.length()`.
    - `dstBegin+srcEnd-srcBegin` is greater than `dst.length`
  Parameters:
    `srcBegin` - start copying at this offset.
    `srcEnd` - stop copying at this offset.
    `dst` - the array to copy the data into.
    `dstBegin` - offset into `dst`.

Groovy Documentation