public int @NotNull [] toArray(int startIndex, int length) {
    int[] result = new int[length];
    for (int i = startIndex; i < length; i++) {
      char c = myData[i];
      result[i-startIndex] = c;
    }
    return result;
  }
public int @NotNull [] toArray(int startIndex, int length)