code: public static Hashtable<String, String> loadCfg(File dir) {
  		Hashtable<String, String> cfgs = new Hashtable<String, String>();
  
  		if (!dir.isDirectory())
  			return cfgs;
  
  		for (File f : dir.listFiles()) {
  			if (f.isDirectory())
  				continue;
  
  			if (f.getName().equals("cfg.cfg")) {
  				try {
  					LineNumberReader lnr = new LineNumberReader(
  							new InputStreamReader(new FileInputStream(f),
  									"UTF-8"));
  					String line = lnr.readLine();
  
  					while (line != null) {
  						line = line.trim();
  
  						if (!line.equals("") && !line.startsWith("#")) {
  							int idx = line.indexOf(":");
  							if (idx > 0)
  								cfgs.put(line.substring(0, idx).trim(), line
  										.substring(idx + 1).trim());
  							else
  								cfgs.put(line, "");
  						}
  						line = lnr.readLine();
  					}
  					lnr.close();
  				} catch (Exception e) {
  					logger.error(
  							"Error reading site configuration file: "
  									+ f.getAbsolutePath(), e);
  				}
  				break;
  			}
  		}
  
  		return cfgs;
  	}
docs: 负责读取cfg.cfg中的配置信息
  
  @param dir
  @return