An Example: Building a World Wide Web Graph
Now that you've learned the basics of Java networking, it would be nice to do something actually useful. As you know, there are millions of Web sites available on the Internet. Each site probably refers to many others sites and you could, if you really wanted to, construct a graph of all the connected Web sites present on the Internet. Of course, doing all of them would take some time, but nonetheless is possible.
The example in Listing 23.16 is a program that takes a URL as an argument and searches for all the URL links that come off the page. This application does not recursively go down into the URL links it finds, but it would not take much to add that functionality and therefore build a huge realistic ...
Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.