Re: Double streams




"Carsten H. Pedersen" <no@xxxxxxx> wrote in message news:43f26362$0$78286$157c6196@xxxxxxxxxxxxxxxxxxxxxxxx
Oliver Wong wrote:
This is strange to me. I expected for there to be two threads, not four. One thread is producing data which is pushes into the FooOutputStream, which then forwards the data to the PipedOutputStream (all within the same thread). Then, a second thread, reads from the FooInputStream, which then requests data from the PipedInputStream, and then consumes the data.

Yeah... i tried to replicate my problem on a smaller scale. I'm fiddling with RMI. So two clients, each of whom has the Foo* Streams, and inside these there is a Remote interface, which can call read() and write(), respectively, on an object on the server. This object being a stream, which extends PipedOutputStream (or PipedInputStream), and the two clients communicate with eachother with the server (and the pipes) as a proxy.


How many threads does each client have, and what does each thread do?

- Oliver

.