URLConnection.getContentHandler() should be
URLConnection.getContentHandler().getContent().
p. 311: In the test() method delete
String theLine;
p. 315: Change "The Image keyword tells you that this is a picture of the white light continuum" to "The IMAGE keyword tells you that this is a picture of the white light continuum"