Close stream when reading/writing is done.

Questo commit è contenuto in:
Holt59 2018-03-11 21:59:55 +01:00
parent 80df87ba51
commit 94cbeef58f
2 ha cambiato i file con 3 aggiunte e 0 eliminazioni

Vedi file

@ -54,6 +54,8 @@ public class BinaryPathReader extends BinaryReader implements PathReader {
nodes.add(readNode(graph));
}
this.dis.close();
return Path.createFastestPathFromNodes(graph, nodes);
}

Vedi file

@ -48,6 +48,7 @@ public class BinaryPathWriter extends BinaryWriter implements PathWriter {
}
dos.flush();
dos.close();
}
}