@Test public void testCsv() { final MockSheetListener listener = new MockSheetListener(); final CsvLineParser lineParser = new CsvLineParser(); final CsvParser parser = new CsvParser( listener, lineParser ); parser.parseFile( getClass().getResourceAsStream( "/data/TestCsv.csv" ) ); assertEquals( "A", listener.getCell( 0, 0 ) ); assertEquals( "B", listener.getCell( 0, 1 ) ); assertEquals( "", listener.getCell( 2, 0 ) ); assertEquals( "C", listener.getCell( 1, 0 ) ); assertEquals( "D", listener.getCell( 1, 1 ) ); assertEquals( "E", listener.getCell( 1, 3 ) ); }
public void parseFile(final InputStream inStream) { final BufferedReader reader = new BufferedReader(new InputStreamReader(inStream, IoUtils.UTF8_CHARSET)); try { startSheet(); processRows(reader); finishSheet(); } catch (final IOException e) { throw new DecisionTableParseException( "An error occurred reading the CSV data.", e); } }
CsvParser implements DecisionTableParser { public void parseFile(final InputStream inStream) { final BufferedReader reader = new BufferedReader(new InputStreamReader(inStream, IoUtils.UTF8_CHARSET)); try { startSheet(); processRows(reader); finishSheet(); } catch (final IOException e) { throw new DecisionTableParseException( "An error occurred reading the CSV data.", e); } } }
CsvParser implements DecisionTableParser { public void parseFile(final InputStream inStream) { final BufferedReader reader = new BufferedReader(new InputStreamReader(inStream, IoUtils.UTF8_CHARSET)); try { startSheet(); processRows(reader); finishSheet(); } catch (final IOException e) { throw new DecisionTableParseException( "An error occurred reading the CSV data.", e); } } CsvParser(final DataListener listener,
            final CsvLineParser lineParser);  CsvParser(final List<DataListener> listeners, final CsvLineParser lineParser); }
CsvParser implements DecisionTableParser { public void parseFile(final InputStream inStream) { final BufferedReader reader = new BufferedReader(new InputStreamReader(inStream, IoUtils.UTF8_CHARSET)); try { startSheet(); processRows(reader); finishSheet(); } catch (final IOException e) { throw new DecisionTableParseException( "An error occurred reading the CSV data.", e); } } CsvParser(final DataListener listener,
            final CsvLineParser lineParser);  CsvParser(final List<DataListener> listeners, final CsvLineParser lineParser); void parseFile(final InputStream inStream); void parseFile(final File file); }
CsvParser implements DecisionTableParser { public void parseFile(final InputStream inStream) { final BufferedReader reader = new BufferedReader(new InputStreamReader(inStream, IoUtils.UTF8_CHARSET)); try { startSheet(); processRows(reader); finishSheet(); } catch (final IOException e) { throw new DecisionTableParseException( "An error occurred reading the CSV data.", e); } } CsvParser(final DataListener listener,
            final CsvLineParser lineParser);  CsvParser(final List<DataListener> listeners, final CsvLineParser lineParser); void parseFile(final InputStream inStream); void parseFile(final File file);  }