Here you can find the source of rangeCheck(int arrayLength, int offset, int length)
public static boolean rangeCheck(int arrayLength, int offset, int length)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean rangeCheck(int arrayLength, int offset, int length) { return offset >= 0 && offset <= arrayLength && length >= 0 && length <= arrayLength - offset; }//from w ww. j a va 2s . co m }