By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,806 Members | 1,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,806 IT Pros & Developers. It's quick & easy.

Stream Text to array list

P: 1
Hello am trying to make a stream text file add to an array list. i tryed many diffent ways but nothinged worked out
heres where am stuck at
my problem is it only display 1 line atm:

try
{
URL url = new URL("http://test.txt");//news url
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
String arraylist = br.readLine();
if(arraylist != null) this.news = arraylist;


}
catch(Exception e){e.printStackTrace();}
}
Apr 29 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.