internal int checkIndex(int i, int nb) { // package-private if ((i < 0) || (nb > _limit - i)) throw new IndexOutOfBoundsException(); return i; }