code: public int getValueAsIntWithDefault(String keyIdField, int defaultVal) throws IOException {
          if(keyToValue.containsKey(keyIdField)) {
              return Integer.parseInt(getValue(keyIdField));
          }
          else return defaultVal;
      }
docs: Calls the getValue method first and the converts to an integer.
  @param keyIdField the key to obtain
  @return the integer value associated