Here you can find the source of getURLDataList(URL StrurlStringing)
public static List getURLDataList(URL StrurlStringing)
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; import java.util.List; public class Main { public static List getURLDataList(URL StrurlStringing) { List list = new ArrayList(); try {//w ww. j a v a2s .c om System.out.println("Loading - " + StrurlStringing); URLConnection connection = StrurlStringing.openConnection(); connection.connect(); // Read all the text returned by the server BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); String str = in.readLine(); while (str != null) { list.add(str); str = in.readLine(); } in.close(); return list; } catch (Exception e) { System.out.print("Error : " + e.getMessage()); e.printStackTrace(); } return null; } }