mercredi 4 mars 2015

How do I retrieve a single piece of data from a website from java?

I am creating a process in my java program that needs to retrieve the stock prices from Yahoo Finance and I can't figure out how to do it nor do I know where to start. So far I have it so that it can connect to any specific stock page that I want it to but I'm not sure how to go about retrieving the current stock price.



urlName = "http://ift.tt/Jz88mB" + ticker + "&ql=0";
URL url = new URL(urlName);
// Get the input stream through URL Connection
URLConnection con = url.openConnection();
InputStream is =con.getInputStream();
con.connect();




Aucun commentaire:

Enregistrer un commentaire