Properties props = new Properties();
InputStream in = new BufferedInputStream(new FileInputStream(GenPath
.getAddress()
+ "\\city.properties"));
BufferedReader bf = new BufferedReader(new InputStreamReader(in));
props.load(bf);
Set<Object> list = props.keySet();
File f = new File(GenPath.getAddress() + "\\city_1.properties");
FileOutputStream fos = new FileOutputStream(f);
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(fos,
"UTF-8"));
for (Object o : list) {
System.out.println(props.getProperty(o.toString()));
writer.write(props.getProperty((String) o) + "=" + o.toString()
+ "\r\n");
}
writer.flush();
writer.close();
System.out.print("over");