Moved I/O alert to file reader

This commit is contained in:
2022-02-22 22:11:50 -06:00
parent d785aa0da2
commit 1630f9ccba
2 changed files with 3 additions and 2 deletions

View File

@@ -18,8 +18,11 @@ public class GraphDataObjectWriter {
public void writeDataToFile() {
try (BufferedOutputStream bufferedOut = new BufferedOutputStream(new FileOutputStream(filename));
ObjectOutputStream out = new ObjectOutputStream(bufferedOut);
){
System.out.println("Writing graph and occupancy data to file. This may take some time.");
System.out.println("File I/O time is not included in results.");
out.writeObject(data);
} catch (IOException ex) {
ex.printStackTrace();

View File

@@ -232,8 +232,6 @@ public class InteractiveInterface {
GraphWithMapData data = Simulator.makeGraph(cells, plate, true);
assert filename != null;
GraphDataObjectWriter dataWriter = new GraphDataObjectWriter(filename, data);
System.out.println("Writing graph and occupancy data to file. This may take some time.");
System.out.println("File I/O time is not included in results.");
dataWriter.writeDataToFile();
System.out.println("Graph and Data file written to: " + filename);
System.gc();