int (byte @NotNull [] array, byte @NotNull [] pattern, int startIndex) { for (int i = startIndex; i <= array.length - pattern.length; i++) { if (startsWith(array, i, pattern)) { return i; } } return -1; }