protected void checkRange(int index, int len) {
		if (index < 0 || len < 0 || index+len > size()) {
			throw new IndexOutOfBoundsException("Invalid range: " + index + "/" + len + " (size: " + size() + ")");
		}
	}
Check that specified range is valid.

@param index	start index of range to check
@param len	number of elements  in range to check
@throws IndexOutOfBoundsException if index is invalid
jphp-runtime/src/php/runtime/memory/support/IList.java