Try to improve mapsforge auto file detection.

This commit is contained in:
Holt59
2018-02-25 21:39:57 +01:00
parent d4b1ef0481
commit 05c4f0da2a
4 changed files with 104 additions and 155 deletions

View File

@@ -2,6 +2,9 @@ package org.insa.graph.io;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
@@ -20,7 +23,8 @@ public class BinaryGraphReaderTest {
@BeforeAll
static void initAll() throws IOException {
BinaryGraphReader reader = new BinaryGraphReader(Openfile.open("midip"));
BinaryGraphReader reader = new BinaryGraphReader(
new DataInputStream(new BufferedInputStream(new FileInputStream("Maps/midip.map"))));
midip = reader.read();
}