Return an string from a ResourceBundle.

@param source
ResourceBundle from which extract the value
@param key
The key to retrieve the value
@param defaultValue
When the wanted value doesn't exist, return this one
@return The wanted object or defaulValue
342533
public static String getString(final ResourceBundle source, final String key, final String defaultValue)
	{
		try
		{
			return source.getString(key);
		}
		catch (Exception _exception)
		{
			return defaultValue;
		}
	}
474060
public byte getByte(String key, byte defaultValue) {
		addToDefaults(key, Byte.toString(defaultValue));
		String value = get(key);
		if (value == null) {
			return defaultValue;
		} else {
			return Byte.valueOf(value);
		}
	}
168541
public String getProperty(String key, String defaultValue) {
        String val = properties.get(key);

        if (val == null) {
            val = defaultValue;
        }

        return val;
    }
1207825
private String getString(String key, String defaultValue, boolean required) {
        String value = map.get(key);
        if (value == null || value.length() == 0) {
            if (required) {
                throw new NullPointerException("Property value for key '" + key + "' is required");
            } else {
                return defaultValue == null ? value : defaultValue;
            }
        } else {
            return value;
        }
    }
1319101
public boolean getProperty(String key, boolean defaultValue) {
        String value = getProperty(key, String.class);
        return StringUtils.isEmpty(value) ? defaultValue : Boolean.parseBoolean(value);
    }
1316823
@SuppressWarnings("unchecked")
    public <T> T get(Option<T> key) {
        T v = (T) this.values.get(key);
        if (v == null) {
            v = key.defaultValue();
            this.values.put(key, v);
        }
        return v;
    }
455759
public String getString(String key, String defaultString) {
        if (tnls != null)
            return tnls.getString(key, defaultString);

        return defaultString;
    }
966835
public String getProperty(String key,String defaultValue)
    {
        //get property value
        return this.PROPERTIES.getProperty(key,defaultValue);
    }
965220
public String optString(String key, String defaultValue) {
        Object object = this.opt(key);
        return NULL.equals(object) ? defaultValue : object.toString();
    }
138289
@Override
	public String getDisplayValue(final ResourceBundleKey resourceBundleKey)
	{
		return ResourceModelFactory
			.newResourceModel(getPropertiesKey(resourceBundleKey.getKey()),
				resourceBundleKey.getParameters(), component, resourceBundleKey.getDefaultValue())
			.getObject();
	}
676099
public String getString(String name, String defaultValue) {
        String value = getProperties().getProperty(name, defaultValue);
        value = overrides.getProperty(name, value);

        return value;
    }
449665
public String get(String key) {
        try { 
            return bundle.getString(key); 
        }catch(MissingResourceException e) { 
            logger.warn("Missing resource.", e);
            return key; 
        }
    }
855033
private String getDefaultMessage(String key) {
        if(_defaultResourceBundle == null)
            _defaultResourceBundle = createResourceBundle(DEFAULT_RESOURCE_BUNDLE);
        return _defaultResourceBundle.getString(key);
    }
1284473
public String get(String key, String defaultValue) {
        String value = parameters.get(key);
        return StringUtils.isBlank(value) ? defaultValue : value;
    }
555837
public String getProperty(String key, String defaultValue) {
		return props.getProperty(prefix + key, defaultValue);
	}
377896
public Object get(String key, Object defaultValue) {
        Object value = get(key);
        return value == null ? defaultValue : value;
    }
1034312
public String getProperty(String key, String defaultValue) {
        String value = getProperty(key, String.class);
        return StringUtils.isEmpty(value) ? defaultValue : value;
    }