public static int indexOf(byte[] array, byte value, int startIndex, int endIndex) {
    """
	Finds the first occurrence in an array from specified given position and upto given length.
    """
		for (int i = startIndex; i < endIndex; i++) {
			if (array[i] == value) {
				return i;
			}
		}
		return -1;
	}
public static int indexOf(byte[] array, byte value, int startIndex, int endIndex) {
		for (int i = startIndex; i < endIndex; i++) {
			if (array[i] == value) {
				return i;
			}
		}
		return -1;
	}
public static int indexOf ( byte [ ] array , byte value , int startIndex , int endIndex ) { for ( int i = startIndex ; i < endIndex ; i ++ ) { if ( array [ i ] == value ) { return i ; } } return - 1 ; }
Finds the first occurrence in an array from specified given position and upto given length.
Finds the first occurrence in an array from specified given position and upto given length .