class HeaderHelper {

    static float parseQualityValue(String qString) {
        if (qString.length() > 5) {
            throw new IllegalArgumentException("Quality value string has more then 5 characters");
        }

        float qValue;
        try {
            qValue = Float.valueOf(qString);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException(String.format("Invalid quality value '%s'", qString));
        }
        if (qValue > 1.0F) {
            throw new IllegalArgumentException("Quality value can't be greater then 1.0");
        }

        return qValue;
    }

    private  HeaderHelper();

}