QueryResultsReader { public static Dataset read(File file) throws IOException { final InputStream in = new FileInputStream(file); final Dataset dataset = read(in); in.close(); return dataset; }  static Dataset read(File file); static Dataset read(InputStream in);  }
@Test public void testRead() { URL url = getClass().getResource("/vars/query/util/SES6061.txt"); Dataset dataset = null; try { InputStream in = url.openStream(); dataset = QueryResultsReader.read(in); in.close(); } catch (IOException e) { Assert.fail(e.getMessage()); } Assert.assertNotNull("Dataset that was read is null", dataset); Assert.assertEquals("Number of columns was wrong", 11, dataset.getColumnCount()); Assert.assertEquals("Number of rows was wrong", 11164, dataset.getRowCount()); Object[] urls = dataset.getData("Image"); Object[] timecodes = dataset.getData("TapeTimeCode"); Assert.assertEquals("First value in 'Image' column is wrong", "http: urls[0]); Assert.assertEquals("First value in 'TapeTimeCode' column is wrong", "00:00:00:00", timecodes[0]); Assert.assertEquals("Last value in 'Image' column is wrong", "http: urls[urls.length - 1]); Assert.assertEquals("Last value in 'TapeTimeCode' column is wrong", "00:00:26:21", timecodes[timecodes.length - 1]); }