public static boolean hasCharset(String ctype)
    {
        if (ctype == null)
        {
            return false;
        }
        Matcher matcher = CHARSET_PATT.matcher(ctype);
        if (matcher.find())
        {
            return true;
        }
        else
        {
            return false;
        }
    }
public static boolean hasCharset ( String ctype ) { if ( ctype == null ) { return false ; } Matcher matcher = CHARSET_PATT . matcher ( ctype ) ; if ( matcher . find ( ) ) { return true ; } else { return false ; } }
Check if a content-type string has a charset field appended.

@param ctype
the content-type string
@return true if {@code ctype} has a charset, false otherwise