code: public static Map<String, String> loadMap(File f) throws IOException {
          Properties props = new Properties();
          FileInputStream in = new FileInputStream(f);
          try {
              props.load(in);
              Map<String, String> map = new HashMap<String, String>();
              Set<Entry<Object, Object>> entrySet = props.entrySet();
              for (Entry<Object, Object> entry : entrySet) {
                  // The casts to String should always succeed
                  map.put((String) entry.getKey(), (String) entry.getValue());
              }
              return map;
          } finally {
              try {
                  in.close();
              } catch (IOException e) {
              }
          }
      }
docs: Loads a Map from the given Properties file.
  
  @param f
  the Properties file to parse.
  @return a Map&lt;String, String&gt; representing the given Properties file.
  @throws IOException
  @see java.util.Properties
  @see java.util.Map