class ByteUtilities {

    static int indexOf(byte[] bytes, int byteLength, byte[] marker)
    {
        int index = -1;
        int length = byteLength - (marker.length - 1);
        for (int b = 0; b < length; b++)
        {
            boolean equals = true;
            for (int m = 0; m < marker.length; m++)
            {
                if (bytes[b + m] != marker[m])
                {
                    equals = false;
                    break;
                }
            }

            if (equals)
            {
                return b;
            }
        }
        return index;
    }

    private  ByteUtilities();

}