Reading Text from a URL try { URL url = new URL( "http://hostname:80/index.html"); BufferedReader in = new BufferedReader( new InputStreamReader(url.openStream())); String str; while ((str = in.readLine()) != null) { process(str); } in.close(); } catch (MalformedURLException e) { } catch (IOException e) { }