Java Reference
In-Depth Information
Figure 6.5: HTML Images
As you can see there are images of the flags of all fifty US states. This recipe will show
how to extract these images. The recipe is shown in Listing 6.8.
Listing 6.8: Extracting Images from HTML (ExtractImages.java)
package com.heatonresearch.httprecipes.ch6.recipe5;
import java.io.*;
import java.net.*;
import com.heatonresearch.httprecipes.html.*;
public class ExtractImages
{
/*
* The size buffer to use for downloading.
*/
public static int BUFFER_SIZE = 8192;
Search WWH ::




Custom Search