Corrections to Chapter 6 of Java Network Programming, The InetAddress Class

p. 170: In the third text paragraph, "explicitly via getAddress" should be "explicitly via getHostName".

p. 177: In the second line "lsreturns" should be "returns".

p. 177: The second sentence of the third paragraph should read, "The conditional operator ? tests whether signedByte is negative." That is, change unsignedByte to signedByte.

p. 179: This is not exactly an error in the book, but no longer exists. For example 6-8 try instead.

p. 189: In the processLogFile() method in Example 6-11, PooledWeblog, the body of the try block should read as follows:

      String entry = in.readLine();
      while (entry != null) {
        if (entries.size() > numberOfThreads) {
          try {
            Thread.sleep((long) (1000.0/numberOfThreads));
          catch (InterruptedException e) {}

        synchronized (entries) {
          entries.add(0, entry);
        entry = in.readLine();
      } // end while

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

Copyright 2000, 2001, 2003 Elliotte Rusty Harold
Last Modified January 5, 2003