code: public int indexOf(byte[] srcBytes, byte[] searchBytes, int startIndex, int endIndex) {
  
  		final int searchBytesLeng = searchBytes.length;
  
  		if (searchBytesLeng == 0 || (endIndex - startIndex + 1) < searchBytesLeng) {
  
  			return -1;
  		}
  
  		final int srcBytesLeng = srcBytes.length;
  
  		final int maxScanStartPosIdx = srcBytesLeng - searchBytesLeng;
  
  		final int loopEndIdx;
  
  		if (endIndex < maxScanStartPosIdx) {
  			loopEndIdx = endIndex;
  		} else {
  			loopEndIdx = maxScanStartPosIdx;
  		}
  
  		int lastScanIdx = -1;
  
  		label: // goto label
  		for (int i = startIndex; i <= loopEndIdx; i++) {
  
  			for (int j = 0; j < searchBytesLeng; j++) {
  
  				if (srcBytes[i + j] != searchBytes[j]) {
  					continue label;
  				}
  
  				lastScanIdx = i + j;
  
  			}
  
  			if (endIndex < lastScanIdx || lastScanIdx - i + 1 < searchBytesLeng) {
  				// it becomes more than the last index
  				// or less than the number of search bytes
  				return -1;
  			}
  
  			return i;
  		}
  		return -1;
  	}
docs: Returns the index within this byte-array of the first occurrence of the
  specified(search bytes) byte array.<br>
  Starting the search at the specified index, and end at the specified
  index.
  
  @param srcBytes
  @param searchBytes
  @param startIndex
  @param endIndex
  @return