Java tutorial
import java.net.URL; import java.net.URLConnection; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { URLConnection connection = new URL("http://java.net").openConnection(); String text = new Scanner(connection.getInputStream()).useDelimiter("\\Z").next(); } }