Corrections to Chapter 6 of Java Network Programming, The Network Methods of java.applet.Applet

p. 113: There are some extra closing parentheses at the ends of the last three code fragments. They should be:
Image myImage = getImage(getCodeBase(), "logo.gif");
Image myImage = getImage( getDocumentBase(), "logo.gif");
Image myImage = getImage( getDocumentBase(), "images/logo.gif");
p. 114: The last code fragment at the bottom of the page has an extra closing parenthesis at the end. It should be

play(getCodeBase(), "");
p. 115: The first two code fragments at the top of the page have extra closing parentheses. They should be:

play(getDocumentBase(), getParameter("soundfile"));
play (getDocumentBase(), "sounds/");
p. 116: The first and third code fragments on the page have extra pparentheses. They should be:

getAudioClip(getCodeBase(), "");
getAudioClip (getDocumentBase(), "sounds/");
p. 130-131: The two code fragments in the statusID() section incorrectly use statusAll() instead of statusID(). The first should be:

if ((m.statusID(2, false) & ImageObserver.COMPLETED) == ImageObserver.COMPLETED) {

The second at the top of p. 131 should be:

(m.statusID(2, false) & ImageObserver.ABORTED) == ImageObserver.ABORTED)

p. 148: The second to last paragraph should read:

The Multihome applet redirects requests for to requests for, requests for to requests for, and so on.

[ Java Network Programming Corrections | Java Network Programming Home Page | Table of Contents | Examples | Order from Amazon ] ]

Copyright 1998, 1999 Elliotte Rusty Harold
Last Modified February 14, 2000