You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
461 B
18 lines
461 B
package data;
|
|
|
|
import model.Shop;
|
|
|
|
import java.io.FileInputStream;
|
|
import java.io.IOException;
|
|
import java.io.ObjectInputStream;
|
|
|
|
public class Loader implements Loadable {
|
|
@Override
|
|
public Shop load() throws IOException, ClassNotFoundException {
|
|
try (ObjectInputStream ois = new ObjectInputStream(new FileInputStream("save.bin"))) {
|
|
System.out.println("...loading!...");
|
|
return (Shop) ois.readObject();
|
|
}
|
|
}
|
|
}
|