Java 2 Networking
Chapter 13 Updates
|
Last Updated: 8 October 1999
This page contains links to the latest updates of the code and text to
Chapter 13: Sharing Your Thoughts. Like the previous chapter, most of
the updates here deal with deprecated methods. For a full list and explanation
of the changes, please refer to Chapter 11.
General Comments
Unfortunately, I still haven't got around to updating the capabilities of the
client code. There are still elements that it ignores and some minor Swing
related problems. Luckily, unlike the previous
chapter, the Swing package name changes did actually make it through to
the CD code before hitting the shelves.
One of the more frequently asked questions is the whereabouts of the class
WhiteboardServer. Unfortunately this is a mistake that slipped
my attention. This class does not exist. To run the server you need to
run the class: ajn.chapter13.shared.server.SharedDataServer.
On the server side, the logging now functions properly.
Code Changes
For this chapter, there is quite a few changes, but most of them are fairly
trivial. Most of the updates are almost identical to the items shown in the
earlier chapters.
ajn.chapter13.shared
ChatConsumer.java
Line 66 fetches the data as an array of bytes. We need to change the old
deprecated method to:
byte[] msg = data.getDataAsBytes();
DrawingConsumer.java
Line 599 also references the data as an array of bytes. Make the same change
here:
byte[] msg = data.getDataAsBytes();
SharedDrawing.java
[
Homepage
][
J2 Networking
][
Linux
][
Books
][
Java
][
About
]