Java Reference
In-Depth Information
Figure 6.8: A Partial HTML Page
As you can see the images for the states are only shown five at a time. This recipe will
process all of the “next page” links until all pages have been downloaded. The recipe is shown
in Listing 6.10.
Listing 6.10: Parse HTML Partial-Pages (ExtractPartial.java)
package com.heatonresearch.httprecipes.ch6.recipe7;
import java.io.*;
import java.net.*;
import com.heatonresearch.httprecipes.html.*;
public class ExtractPartial
{
/*
* The size buffer to use for downloading.
*/
public static int BUFFER_SIZE = 8192;
/**
Search WWH ::




Custom Search