读起配置文件
public static HashMap readPropertyFile(String file) throws IOException{ HashMap map = new HashMap(); InputStream is = FileUtil.class.getResourceAsStream(file); Properties properties = new Properties(); properties.load(is); Enumeration en = properties.propertyNames(); while( en.hasMoreElements()){ String key=(String)en.nextElement(); String code = new String(properties.getProperty(key).getBytes("ISO-8859-1"),"gbk"); map.put(key,code); if (GlobalNames.DEBUG_PERFERMANCE_FLAG) { System.out.println(file+":"+code); } } return map; }