Piped I/O stream in java
问题 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? 回答1: Short motivation: Separation of concerns (always good - in this case it helps split your code into reading and writing part) Multithreading (previous point lead to "easy" (its never easy :D) parallelization) Long explanation/example: Imagine you have "producer-consumer" like application.