* @throws IOException
*
* @throws Exception
*/
private ICsvBeanReader setup(String ticker, DateTime startDt, DateTime endDt) throws IOException {
ICsvBeanReader beanReader = null;
URL yahoo;
StringBuffer urlStr = new StringBuffer(YAHOO_URL + ticker);
/*if (startDt!=null && endDt !=null){
//http://ichart.yahoo.com/table.csv?s=GOOG&a=0&b=1&c=2000&d=0&e=31&f=2010&g=w
int startDtNumOfMonth = startDt.getMonthOfYear()-1;
int startDtNumOfDay = startDt.getDayOfMonth();
int startDtYear = startDt.getYear();
int endDtNumOfMonth = endDt.getMonthOfYear()-1;
int endDtNumOfDay = endDt.getDayOfMonth();
int endDtYear = endDt.getYear();
//url construction
urlStr.append("&a=").append(startDtNumOfMonth);
urlStr.append("&b=").append(startDtNumOfDay);
urlStr.append("&c=").append(startDtYear);
urlStr.append("&d=").append(endDtNumOfMonth);
urlStr.append("&e=").append(endDtNumOfDay);
urlStr.append("&f=").append(endDtYear);
urlStr.append("&g=d&ignore=.csv");
}*/
yahoo = new URL(urlStr.toString());
BufferedReader in = new BufferedReader(new InputStreamReader(
yahoo.openStream()));
beanReader = new CsvBeanReader(in, CsvPreference.STANDARD_PREFERENCE);
beanReader.getHeader(true);
return beanReader;
}