Blog Archive for September 14, 2010

Processing CSV in Java

September 14, 2010

Unlike Python, Java doesn't have built in support for CSV files. I needed to process them for a recent project, and I decided to use opencsv from http://sourceforge.net/projects/opencsv/.

Using this, it was simple to process the CSV file line by line:

import au.com.bytecode.opencsv.CSVReader;

CSVReader lCsvReader = new CSVReader …

Async POST in Java

September 14, 2010

I had a requirement to receive a CSV file via a HTTP post, and process it line by line after telling the user that we've received the file.

The best way I found to do this was to accept the file, perform an Async POST on a different local URL …