July 2017
Beginner to intermediate
715 pages
17h 3m
English
We already have spoken about reading text data in great detail, and it can be done, for example, using the Files helper class from the NIO API or IOUtils from Commons IO.
CSV (Comma Separated Values) is a common way to organize tabular data in plain text files. While it is possible to parse CSV files by hand, there are some corner cases, which make it a bit cumbersome. Luckily, there are nice libraries for that purpose, and one of them is Apache Commons CSV:
<dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-csv</artifactId> <version>1.4</version> </dependency>
To illustrate how to use this library, let's generate some random data once again. This time we can also use http://www.generatedata.com/ ...
Read now
Unlock full access