Retrieve a short from bundle.

@param key          the key of resource
@param defaultValue the default value if key is missing

@return the resource short

@throws MissingResourceException if the requested key is unknown
486590
public short getShort( String key, short defaultValue )
        throws MissingResourceException
    {
        try
        {
            return getShort( key );
        }
        catch( MissingResourceException mre )
        {
            return defaultValue;
        }
    }
350257
@SuppressWarnings({"unchecked", "UnusedDeclaration"})
  // Checked by runtime cast. Public API.
  public static <T> T get(Bundle bundle, String key) {
    return (T) bundle.get(key);
  }
156048
public static Object getObject(final ResourceBundle source, final String key, final Object defaultValue)
	{
		try
		{
			return source.getObject(key);
		}
		catch (Exception _exception)
		{
			return defaultValue;
		}
	}
736921
public int getProperty(String key, int defaultValue) {
        String value = getProperty(key, String.class);
        return StringUtils.isEmpty(value) ? defaultValue : Integer.parseInt(value);
    }
128452
public static String getProperty(final ResourceBundle bundle, final String key) {
		if (bundle == null) {
			return key;
		}
		try {
			return bundle.getString(key);
		} catch (MissingResourceException e) {
			LOG.warn("找不到名为 " + key + " 的资源项", e);
			return key;
		}
	}
633871
public short getOrElse(String key, short defaultValue) {
        int hash = d_keys.number(key);
        if (hash == -1)
            return defaultValue;

        return d_values[hash - 1];
    }
966835
public String getProperty(String key,String defaultValue)
    {
        //get property value
        return this.PROPERTIES.getProperty(key,defaultValue);
    }
1049246
public Date getTime( String key, Date defaultValue )
        throws MissingResourceException
    {
        try
        {
            return getTime( key );
        }
        catch( MissingResourceException mre )
        {
            return defaultValue;
        }
    }
740501
public long getUsedBytesOnTiersOrDefault(
      java.lang.String key,
      long defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.Long> map =
        internalGetUsedBytesOnTiers().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
137698
public boolean getBoolean( String key, boolean defaultValue )
        throws MissingResourceException
    {
        try
        {
            return getBoolean( key );
        }
        catch( MissingResourceException mre )
        {
            return defaultValue;
        }
    }
283577
public static String getStringValue(String key, String defaultValue) {
        return getStringValue(null, key, defaultValue);
    }
869757
public java.lang.String getHttpHeadersOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetHttpHeaders().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
957305
@SuppressWarnings("unchecked")
    @Override
    public final <T> T get(final IKey<T> key) {
        T value = (T) config.get(key.key());

        return value != null ? value : key.getDefaultValue();
    }
276324
public short getShort(final String key) {
		final String value = getProperty(key);
		if (value == null) {
			throw new NumberFormatException("Couldn't parse property to short.");
		}
		return Short.parseShort(value);
	}
377896
public Object get(String key, Object defaultValue) {
        Object value = get(key);
        return value == null ? defaultValue : value;
    }
724583
public static String getResourceString(String key) {
        ResourceBundle bundle = FindbugsPlugin.getDefault().getResourceBundle();
        try {
            return bundle.getString(key);
        } catch (MissingResourceException e) {
            return key;
        }
    }
995416
public String getCommonProperty(String key, String defaultValue) {
		return props.getProperty(PropertiesBundleConstant.PROPS_PREFIX + key, defaultValue);
	}