@Test public void testIteratorFunctionalityWithRetainEscapeCharsFalse() throws IOException { CsvParser parser = new CsvParserBuilder().retainEscapeChars(false).build(); CsvReader cr = new CsvReader(new StringReader(lines), parser); String[][] expectedResult = new String[7][]; expectedResult[0] = new String[]{"a", "b", "c"}; expectedResult[1] = new String[]{"a", "b,b,b", "c"}; expectedResult[2] = new String[]{"", "", ""}; expectedResult[3] = new String[]{"a", "PO Box 123,\nKippax,ACT. 2615.\nAustralia", "d."}; expectedResult[4] = new String[]{"Glen \"\"The Man\"\" Smith", "Athlete", "Developer"}; expectedResult[5] = new String[]{"\"\"\"\"", "test"}; expectedResult[6] = new String[]{"a\nb", "b", "\nd", "e"}; int idx = 0; for (String[] line : cr) { String[] expectedLine = expectedResult[idx++]; assertArrayEquals(expectedLine, line); } cr.close(); }
@Override public void close() throws IOException { br.close(); }
CsvReader implements Closeable, Iterable<String[]> { @Override public void close() throws IOException { br.close(); } }
CsvReader implements Closeable, Iterable<String[]> { @Override public void close() throws IOException { br.close(); } CsvReader(Reader reader);  CsvReader(Reader reader, int line);  CsvReader(Reader reader, CsvParser csvParser);  CsvReader(Reader reader, int line, CsvParser csvParser); }
CsvReader implements Closeable, Iterable<String[]> { @Override public void close() throws IOException { br.close(); } CsvReader(Reader reader);  CsvReader(Reader reader, int line);  CsvReader(Reader reader, CsvParser csvParser);  CsvReader(Reader reader, int line, CsvParser csvParser); List<String[]> readAll(); String[] readNext(); @Override void close(); @Override Iterator<String[]> iterator(); }
CsvReader implements Closeable, Iterable<String[]> { @Override public void close() throws IOException { br.close(); } CsvReader(Reader reader);  CsvReader(Reader reader, int line);  CsvReader(Reader reader, CsvParser csvParser);  CsvReader(Reader reader, int line, CsvParser csvParser); List<String[]> readAll(); String[] readNext(); @Override void close(); @Override Iterator<String[]> iterator(); static final int DEFAULT_SKIP_LINES; }