import java.io.*; import java.net.*; public class geturl { public static void main(String[] args) { if (args.length > 0) new geturl(args[0]); } geturl(String s) { if (!s.startsWith("http://")) s = "http://" + s; try { URL u = new URL(s); BufferedReader in = new BufferedReader( new InputStreamReader(u.openStream())); String line; while ((line = in.readLine()) != null) System.out.println(line); } catch (Exception e) { System.err.println("Exception: " + e.toString()); } } }