ReaderSource
InputStreamSource
This class may be passed a charset on construction, or alternatively it will use the platform default charset when converting bytes to chars.
365366367368369370371372
/** * Adds a InputStream source to the unit. */ public SourceUnit addSource(String name, InputStream stream) { ReaderSource source = new InputStreamReaderSource(stream, configuration); return addSource(new SourceUnit(name, source, configuration, classLoader, getErrorCollector())); }
342343344345346347348349
303304305306307308309310
403404405406407408409410
343344345346347348349350
58596061626364656667
* @param tableName The name to give to this table. * @param inputStreamSource The resource to obtain data from. */ public CsvTable(CsvParser csvParser, String tableName, InputStreamSource inputStreamSource) { new CsvReader(csvParser).readLines( new InputStreamReaderSource(inputStreamSource), new HeaderCallback(tableName), new DataCallback() ); }