Java - Read CSV file from a stream

less than 1 minute read

1
2
3
4
5
6
7
try (final CSVReader reader = new CSVReader(new BufferedReader(new InputStreamReader(inputStream)))) {
    String[] line = null;
    while ((line = reader.readNext()) != null) {
    }
} catch (Exception e) {
...
}