I am not able to understand the purpose of piped i/o streams in java. If I write something using an outputstream, I can anyways read it again using an inputstream.
So what is the need of a pipedstream?
Pipes in Java IO provides the ability for two threads running in the same JVM to communicate. As such pipes are a common source or destination of data.
A PipedInputStream should be connected to a PipedOutputStream. The data written to the PipedOutputStream by one thread, can thus be read from the connected PipedInputStream by another thread
Normal Java IO does not support streaming to the same stream from multiple threads.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With