/**
* This program is an example from the book "Internet
* programming with Java" by Svetlin Nakov. It is freeware.
* For more information: http://www.nakov.com/books/inetjava/
*/
import java.net.*;
import java.io.*;
public class RetrieveURLExample {
public static void main(String[] args) throws IOException {
URL url = new URL(
"http://www.nakov.com/about/CV-Svetlin-Nakov.html");
BufferedReader in = new BufferedReader(
new InputStreamReader(url.openStream()));
String line;
while ((line = in.readLine()) != null)
System.out.println(line);
in.close();
}
}
Back to Internet
Programming with Java books's web site