private static boolean isSimpleName(String name) {
        for (int i = 0; i < name.length(); i++) {
            char c = name.charAt(i);
            if (c != '-' && c != '+' && c != '.' && c != '_' && !('0' <= c && c <= '9') &&
                    !('a' <= c && c <= 'z')) {
                return false;
            }
        }
        return name.length() > 0;
    }
Parses the given string to a media type. The string is expected
to be of the form "type/subtype(; parameter=...)*" as defined in
RFC 2045, though we also handle "charset=xxx; type/subtype" for
broken web servers.

@param string media type string to be parsed
@return parsed media type, or <code>null</code> if parsing fails
tika-core/src/main/java/org/apache/tika/mime/MediaType.java