code: public static void checkIndex(final int from, final int until, final int size) {
  		if (from < 0) {
  			throw new ArrayIndexOutOfBoundsException("fromIndex = " + from);
  		}
  		if (until > size) {
  			throw new ArrayIndexOutOfBoundsException(format(
  				"Invalid index range: [%d, %s)", from, until
  			));
  		}
  		if (from > until) {
  			throw new IllegalArgumentException(format(
  				"fromIndex(%d) > toIndex(%d)", from, until
  			));
  		}
  	}
docs: Check the given {@code from} and {@code until} indices.
  
  @param from the from index, inclusively.
  @param until the until index, exclusively.
  @param size the array size
  @throws ArrayIndexOutOfBoundsException if the given index is not in the
  valid range.