|
@@ -35,8 +35,7 @@ public class BinaryPathReader extends BinaryReader implements PathReader {
|
35
|
35
|
checkVersionOrThrow(dis.readInt());
|
36
|
36
|
|
37
|
37
|
// Read map ID and check against graph.
|
38
|
|
- String mapId = readFixedLengthString(BinaryGraphReader.MAP_ID_FIELD_LENGTH,
|
39
|
|
- "UTF-8");
|
|
38
|
+ String mapId = readFixedLengthString(BinaryGraphReader.MAP_ID_FIELD_LENGTH, "UTF-8");
|
40
|
39
|
|
41
|
40
|
if (!mapId.equals(graph.getMapId())) {
|
42
|
41
|
throw new MapMismatchException(mapId, graph.getMapId());
|
|
@@ -69,10 +68,7 @@ public class BinaryPathReader extends BinaryReader implements PathReader {
|
69
|
68
|
* @throws IndexOutOfBoundsException if the node is not in the graph.
|
70
|
69
|
*/
|
71
|
70
|
protected Node readNode(Graph graph) throws IOException {
|
72
|
|
- // Discard zone.
|
73
|
|
- dis.readUnsignedByte();
|
74
|
|
-
|
75
|
|
- return graph.getNodes().get(read24bits());
|
|
71
|
+ return graph.getNodes().get(dis.readInt());
|
76
|
72
|
}
|
77
|
73
|
|
78
|
74
|
}
|