Properties prop = new Properties();
InputStream in = new FileInputStream(file);
prop.load(in);
//prop.loadFromXML(in);
in.close();
String name = prop.getProperty("key");
Properties prop = new Properties();
OutputStream out = new FileOutputStream(file);
prop.setProperty(key, value);
prop.store(out, "myname: email");
out.close();

被折叠的 条评论
为什么被折叠?



