参数是propeties文件路径!
//读取properties的全部信息
public static Vector
Properties props = new Properties();
Property property=new Property();
Vector
try {
InputStream in = new BufferedInputStream (new FileInputStream(filePath));
props.load(in);
Enumeration en = props.propertyNames();
//在这里遍历
while (en.hasMoreElements()) {
String key = en.nextElement().toString();//key值
String Property = new String(props.getProperty(key).getBytes("ISO-8859-1"),"gb2312");//value值
propVector.add(key);
}
return propVector;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}