I've been pondering this for a fair amount of time now. I'm trying to download the data from Yahoo!'s Stock API. When you use the API, it gives you a
CSVReader takes a
Reader argument according to the documentation, so it isn't limited to a
FileReader for the parameter.
To use a
CSVReader without saving the file first, you could use a
BufferedReader around a stream loading the data:
URL stockURL = new URL("http://example.com/stock.csv"); BufferedReader in = new BufferedReader(new InputStreamReader(stockURL.openStream())); CSVReader reader = new CSVReader(in); // use reader