Here you can find the source of loadUrlToList(URL iUrl)
public static List<String> loadUrlToList(URL iUrl) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.*; import java.net.URL; import java.util.LinkedList; import java.util.List; public class Main { /**//from ww w . j ava2s . co m * Reads text from a remote URL into a list of strings, each containing one line of the file. */ public static List<String> loadUrlToList(URL iUrl) throws IOException { return loadReaderToList(new InputStreamReader(iUrl.openStream())); } /** * Reads text from an open reader into a list of strings, each containing one line of the file. */ public static List<String> loadReaderToList(Reader reader) throws IOException { List<String> outList = new LinkedList<String>(); String line; BufferedReader bufferedReader = new BufferedReader(reader); while ((line = bufferedReader.readLine()) != null) outList.add(line); return outList; } }