CsvReader extends LineNumberReader { public String[] readRecord() throws IOException { while (true) { String line = readLine(); if (line == null) { return null; } else if (getCommentPrefix() == null || !line.startsWith(getCommentPrefix())) { String[] record = split(line); if (record.length != 0 || !ignoresEmptyLines()) { return record; } } } } CsvReader(Reader reader, char[] separators);  CsvReader(Reader reader, char[] separators, boolean ignoreEmptyLines, String commentPrefix); final char[] getSeparators(); final boolean ignoresEmptyLines(); final String getCommentPrefix(); String[] readRecord(); double[] readDoubleRecord(); List<String[]> readStringRecords(); List<double[]> readDoubleRecords();  }
@Test public void testReadRecord() throws IOException { CsvReader reader = createReader(CSV_DATA, '|'); for (String[] expectedRecord : EXPECTED_RECORDS) { assertArrayEquals(expectedRecord, reader.readRecord()); } assertNull(reader.readRecord()); }