private static boolean subMatch(final String str, int soff, final byte[] m)
    {
        for(int k = 0; k < m.length; k++) {
            if(str.charAt(soff++) != m[k]) {
                return false;
            }
        }
        return true;
    }
private static boolean subMatch ( final String str , int soff , final byte [ ] m ) { for ( int k = 0 ; k < m . length ; k ++ ) { if ( str . charAt ( soff ++ ) != m [ k ] ) { return false ; } } return true ; }
Returns <code>true</code> if <tt>m.length</tt> characters in <tt>str</tt>, starting at offset <tt>soff</tt>
match the bytes in the given array <tt>m</tt>.

@param str the string to search for a match
@param soff the starting offset in str
@param m the array to match
@return <code>true</code> if there is match