Browse Source

Close stream when reading/writing is done.

Holt59 6 years ago
parent
commit
94cbeef58f

+ 2
- 0
src/main/org/insa/graph/io/BinaryPathReader.java View File

54
             nodes.add(readNode(graph));
54
             nodes.add(readNode(graph));
55
         }
55
         }
56
 
56
 
57
+        this.dis.close();
58
+
57
         return Path.createFastestPathFromNodes(graph, nodes);
59
         return Path.createFastestPathFromNodes(graph, nodes);
58
     }
60
     }
59
 
61
 

+ 1
- 0
src/main/org/insa/graph/io/BinaryPathWriter.java View File

48
         }
48
         }
49
 
49
 
50
         dos.flush();
50
         dos.flush();
51
+        dos.close();
51
     }
52
     }
52
 
53
 
53
 }
54
 }

Loading…
Cancel
Save