Here you can find the source of readLines(final String url)
public static final String readLines(final String url) throws IOException
//package com.java2s; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; public class Main { public static final String readLines(final String url) throws IOException { return readLines(new URL(url)); }/*w w w .j a va 2 s .c om*/ public static final String readLines(final URL url) throws IOException { final InputStream stream = url.openStream(); final BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); String lines = ""; String line; while ((line = reader.readLine()) != null) lines += line; reader.close(); stream.close(); return lines; } }