public final boolean startsWith(byte haystack[], byte needle[])
    {
        if (needle == null)
            return false;
        if (haystack == null)
            return false;
        if (needle.length > haystack.length)
            return false;

        for (int i = 0; i < needle.length; i++)
        {
            if (needle[i] != haystack[i])
                return false;
        }

        return true;
    }