public static void loadDemo() throws IOException
{
BufferedReader bufr = new BufferedReader(new FileReader("info.txt"));
FileInputStream fis = new FileInputStream("info.txt");
Properties prop = new Properties();
prop.load(fis);
//prop.list(System.out);
//sop(prop);
prop.setProperty("wangwu", "29");
prop.list(System.out);
FileOutputStream fos = new FileOutputStream("info.txt");
prop.store(fos, "haha");
prop.list(System.out);
fis.close();
fos.close();
}
这里面的load怎么加载?不是很明白. |