@Test public void testStreamingResultSet() throws IOException { BufferedReader bufferedReader = new BufferedReader(new StringReader("?s\t?p\t?o\n" + "<http: + "<http: + "<http: List<Map<String, Node>> result = new ArrayList<>(); try (StreamingResultSet resultSet = new StreamingResultSet(bufferedReader)) { assertArrayEquals(new String[] {"s", "p", "o"}, resultSet.getResultVars()); int rowsRead = 0; assertEquals(rowsRead, resultSet.getRowNumber()); while (resultSet.hasNext()) { Map<String, Node> rs = resultSet.next(); System.out.println(rs); result.add(rs); rowsRead++; assertEquals(rowsRead, resultSet.getRowNumber()); } } assertEquals(3, result.size()); }
public StreamingResultSet(BufferedReader in) throws IOException { this.in = in; tsvParser = new TsvParser(in); if ((currentTuple = tsvParser.getTuple()) == null) { hasNext = false; } }
StreamingResultSet implements Iterator<Map<String, Node>>, Closeable { public StreamingResultSet(BufferedReader in) throws IOException { this.in = in; tsvParser = new TsvParser(in); if ((currentTuple = tsvParser.getTuple()) == null) { hasNext = false; } } }
StreamingResultSet implements Iterator<Map<String, Node>>, Closeable { public StreamingResultSet(BufferedReader in) throws IOException { this.in = in; tsvParser = new TsvParser(in); if ((currentTuple = tsvParser.getTuple()) == null) { hasNext = false; } } StreamingResultSet(BufferedReader in);  StreamingResultSet(HttpURLConnection conn); }
StreamingResultSet implements Iterator<Map<String, Node>>, Closeable { public StreamingResultSet(BufferedReader in) throws IOException { this.in = in; tsvParser = new TsvParser(in); if ((currentTuple = tsvParser.getTuple()) == null) { hasNext = false; } } StreamingResultSet(BufferedReader in);  StreamingResultSet(HttpURLConnection conn); @Override Map<String, Node> next(); String[] getResultVars(); @Override void close(); @Override boolean hasNext(); }
StreamingResultSet implements Iterator<Map<String, Node>>, Closeable { public StreamingResultSet(BufferedReader in) throws IOException { this.in = in; tsvParser = new TsvParser(in); if ((currentTuple = tsvParser.getTuple()) == null) { hasNext = false; } } StreamingResultSet(BufferedReader in);  StreamingResultSet(HttpURLConnection conn); @Override Map<String, Node> next(); String[] getResultVars(); @Override void close(); @Override boolean hasNext();  }