code: public Integer getIntegerProperty(String key, Integer defaultValue) {
          String val = getProperty(key, defaultValue.toString());
          try {
              Integer intVal = Integer.parseInt(val);
              return intVal;
          } catch (NumberFormatException e) {
              return defaultValue;
          }
      }
docs: Gets a boolean property with a boolean value.
  @param key The key string.
  @param defaultValue The default value.
  @return The boolean property value.