Errata

Java Network Programming

Errata for Java Network Programming

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date Submitted
Printed Page 87
In the bottome example, I had a problem related to a deprecated method.

The problem is that the method readLine(), which reads bytes and converts
it to characters, was deprecated since the release of Java 1.1 so it's
not possible to apply to DataInputStream object.

The way I found to solve this problem is the following:

BufferedReader htmlDoc = new BufferedReader(new
InputStreamReader(u.openStream()));

where "u" is an URL object and htmlDoc is a BufferReader object.

Anonymous   
Printed Page 181
I have the 6/99 printing of this book and when I typed in this

example in the try block in the lookUpNames method and tried to use it,
I kept getting an error:

netscape.security.AppletSecurityException: security. Couldn't connect to
'rs.internic.net' with origin from ''.

I have also tried the example I downloaded from this website and the same
error occurs.

Anonymous   
Printed Page 187
In the middle of the page, change "//end try" to "//end catch".

Anonymous   
Printed Page 287
On the bottom of the page, you say in the toExternatForm method

for mailto:

"it assumes the username has been stored in the URL's host
field".

In the paragrap you discussed putting the username in the
File field. You then write the correct method using the
File field for username instead of the host field.

Anonymous   
Printed Page 291
On the top of this page in the return of your getContentType()

method you should have quotes around "text/plain", since it is a
String return type. You also have a mistaken quote at the beginning
before the word "return".

Anonymous