Package com.csvreader

Examples of com.csvreader.CsvReader.skipLine()


        try {
            CsvReader csvReader = initializeReader(new StringReader(fileText));
            // case when the first line is the encoding
            if (!displayFirstLine) {
                csvReader.skipLine();
            }

            boolean setHeader = false;
            while (csvReader.readRecord()) {
                String[] rowValues = csvReader.getValues();
View Full Code Here


  public void test146() throws Exception {
    // testing SkipLine's buffer
    CsvReader reader = CsvReader.parse("\"" + generateString('a', 10000)
        + "\r\nb");
    Assert.assertEquals("", reader.getRawRecord());
    Assert.assertTrue(reader.skipLine());
    Assert.assertEquals("", reader.getRawRecord());
    Assert.assertTrue(reader.readRecord());
    Assert.assertEquals("b", reader.get(0));
    Assert.assertFalse(reader.readRecord());
    reader.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.