這是將hashtable寫入.txt文件的代碼!如何從.txt文件中取回地圖使用屬性?
public static void save(String filename, Map<String, String> hashtable) throws IOException {
Properties prop = new Properties();
prop.putAll(hashtable);
FileOutputStream fos = new FileOutputStream(filename);
try {
prop.store(fos, prop);
} finally {
fos.close();
}
}
我們如何從該文件中取回散列表? 由於
請記住接受(最好)幫助您解決問題的答案。使用答案左側的綠色複選標記。 – Jonik 2010-05-12 20:33:23