Is it possible to use the ProgressMonitorInputStream to monitor the transfer of data of a ObjectInputStream? All the examples I have scene include a filtered input stream (which I don't believe ObjectInputStream is a subclass of). Any ideas? Thanks.
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?
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners