org.eclipse.edje/src/main/java/org/eclipse/edje/util/Util.java
public static void checkBounds(int arrayLength, int offset, int length) throws IndexOutOfBoundsException {
		int offPlusLen = offset + length;
		if (offset < 0) {
			throw new IndexOutOfBoundsException("Negative offset.");
		} else if (length < 0) {
			throw new IndexOutOfBoundsException("Negative length.");
		} else if (offPlusLen > arrayLength) {
			throw new IndexOutOfBoundsException("Offset + length > object length.");
		} else if (offPlusLen < 0) {
			throw new IndexOutOfBoundsException("Offset + length is negative.");
		}
	}
/**
	 * Throws an {@link IndexOutOfBoundsException} when the array bounds are
	 * incoherent:
	 * <li>when the <code>offset</code> is negative</li>
	 * <li>when the <code>length</code> to copy is negative</li>
	 * <li>when <code>offset + length</code> is negative</li>
	 * <li>when <code>offset + length</code> is higher than the array's length
	 * </li>.
	 *
	 * @param arrayLength
	 *            the array's length. Positive for sure (no check)
	 * @param offset
	 *            the offset in array where start the reading
	 * @param length
	 *            the number of data to read from array
	 * @throws IndexOutOfBoundsException
	 *             when at least one argument is incoherent
	 */
Throws an  IndexOutOfBoundsException when the array bounds are
incoherent:
when the offset is negative
when the length to copy is negative
when offset + length is negative
when offset + length is higher than the array's length
.

@param arrayLength
the array's length. Positive for sure (no check)
@param offset
the offset in array where start the reading
@param length
the number of data to read from array
@throws IndexOutOfBoundsException
when at least one argument is incoherent
Throws an IndexOutOfBoundsException when the array bounds are incoherent : when the offset is negative when the length to copy is negative when offset + length is negative when offset + length is higher than the array ' s length . @param arrayLength the array ' s length . Positive for sure ( no check ) @param offset the offset in array where start the reading @param length the number of data to read from array @throws IndexOutOfBoundsException when at least one argument is incoherent
public static void checkBounds(int arrayLength, int offset, int length) throws IndexOutOfBoundsException {
		int offPlusLen = offset + length;
		if (offset < 0) {
			throw new IndexOutOfBoundsException("Negative offset.");
		} else if (length < 0) {
			throw new IndexOutOfBoundsException("Negative length.");
		} else if (offPlusLen > arrayLength) {
			throw new IndexOutOfBoundsException("Offset + length > object length.");
		} else if (offPlusLen < 0) {
			throw new IndexOutOfBoundsException("Offset + length is negative.");
		}
	}
public static void checkBounds ( int arrayLength , int offset , int length ) throws IndexOutOfBoundsException { int offPlusLen = offset + length ; if ( offset < 0 ) { throw new IndexOutOfBoundsException ( "Negative offset." ) ; } else if ( length < 0 ) { throw new IndexOutOfBoundsException ( "Negative length." ) ; } else if ( offPlusLen > arrayLength ) { throw new IndexOutOfBoundsException ( "Offset + length > object length." ) ; } else if ( offPlusLen < 0 ) { throw new IndexOutOfBoundsException ( "Offset + length is negative." ) ; } }
Throws an {@link IndexOutOfBoundsException} when the array bounds are
 incoherent:
 <li>when the <code>offset</code> is negative</li>
 <li>when the <code>length</code> to copy is negative</li>
 <li>when <code>offset + length</code> is negative</li>
 <li>when <code>offset + length</code> is higher than the array's length
 </li>.
Throws an { @link IndexOutOfBoundsException } when the array bounds are incoherent : <li > when the <code > offset< / code > is negative< / li > <li > when the <code > length< / code > to copy is negative< / li > <li > when <code > offset + length< / code > is negative< / li > <li > when <code > offset + length< / code > is higher than the array ' s length < / li > .