private static float toFloat(final String str, final float defaultValue) {
        if (str == null) {
            return defaultValue;
        }
        try {
            return Float.parseFloat(str);
        } catch (final NumberFormatException nfe) {
            return defaultValue;
        }
    }
Finds best match

@param supported the supported types
@param header    the header
@return the best match
src/main/java/spark/utils/MimeParse.java