package com;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.Map;
import java.util.Map.Entry;
public class E {
public static void main(String[] args)
throws IOException, ClassNotFoundException {
String sf = "C:\\Users\\AOC\\ewwq\\N2\\.mc\\mcInfo.mc"
;
syccc(sf);
System.out.println("---------------------------------------"
);
sf = "C:\\Users\\AOC\\ewwq\\N3\\.mc\\mcInfo.mc"
;
syccc(sf);
}
public static Map<String, Map<String, String>> syccc(String sf)
throws IOException, ClassNotFoundException {
FileInputStream fin =
new FileInputStream(sf);
ObjectInputStream obs =
new ObjectInputStream(fin);
Map<String, Map<String, String>> map = (Map<String, Map<String, String>>
) obs.readObject();
for (Entry<String, Map<String, String>>
mapec : map.entrySet()) {
System.out.println(mapec.getKey() + "---------------" +
mapec.getValue());
}
return map;
}
}
转载于:https://www.cnblogs.com/zhangjiangbin/p/11558448.html