posted 16 years ago
Ya, I have no problem setting up the object stream and communicating over it using the following code:
Socket socket = new Socket("127.0.0.1", 2200);
InputStream istream = socket.getInputStream();
ProgressMonitorInputStream pmis =
new ProgressMonitorInputStream(this, "Reading object", istream);
ObjectInputStream obj_in = new ObjectInputStream(pmis);
When the code runs and I connect with a the server, I can successfully transfer objects. However, I noticed that the available() method always returns a 0 (istream.available(), pmis.available(), or obj_in.available()). This is a problem as the ProgressMonitorInputStream class depends on the stream returning an integer other than 0 when the available() method is called.
Any other ideas?