Java tutorial
import java.io.DataInputStream; import java.net.URL; public class Main { public static void main(String[] args) throws Exception { String thisLine; URL u = new URL("http://www.google.com"); DataInputStream theHTML = new DataInputStream(u.openStream()); while ((thisLine = theHTML.readLine()) != null) { System.out.println(thisLine); } } }