坦克大战(一期)-设计模式-备忘录模式1.2

DesignPatterns
bingor 2 years ago
parent 07b55675f3
commit e084821a98

@ -138,6 +138,7 @@ public class GameModel {
} catch (IOException e) {
e.printStackTrace();
} finally {
if(null != oos) {
try {
oos.close();
} catch (IOException e) {
@ -145,6 +146,7 @@ public class GameModel {
}
}
}
}
public void load() {
File file = new File("F:\\bingor\\temp\\tank.data");
@ -156,13 +158,14 @@ public class GameModel {
} catch (IOException | ClassNotFoundException e) {
e.printStackTrace();
} finally {
if(null != ois) {
try {
ois.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}

Loading…
Cancel
Save