code: private void read(final File f) throws IOException {
          final FileReader fr = new FileReader(f);
          final BufferedReader br = new BufferedReader(fr);
          String input = null;
          while ((input = br.readLine()) != null) {
  
              // Trim whitespace.
              input = input.trim();
  
              // Skip comments
              if (input.startsWith(COMMENT)) continue;
  
              final int idx = input.indexOf(NAME_VALUE_DELIMITER);
              if (idx == -1) continue;
  
              String name, value;
              try {
                  name = input.substring(0, idx);
                  value = input.substring(idx + 1);
              } catch (IndexOutOfBoundsException e) {
                  continue;
              }
              name = name.trim();
              value = value.trim();
  
              cfgMap.put(name, valueSubstitution(value));
          }
          br.close();
      }
docs: /*
  Reads a file populating a map for a call to read(Map) below.
  
  @throws IOException Thrown if an I/O error occurs