SHOW:
|
|
- or go back to the newest paste.
| 1 | protected List<T> readData(Reader reader) throws Exception{ | |
| 2 | List<T> items= new ArrayList<T>(); | |
| 3 | try{ | |
| 4 | Iterable<CSVRecord> records = CSVFormat.APPLE.withDelimiter('|').withHeader(factory.header()).withFirstRecordAsHeader().parse(reader); | |
| 5 | for(CSVRecord record : records){ | |
| 6 | patients.add(factory.instance(record)); | |
| 7 | } | |
| 8 | } finally { | |
| 9 | reader.close(); | |
| 10 | } | |
| 11 | return items; |