posted 24 years ago
No, that's correct. But B isn't actually talking about an InputStream and an OutputStream; it's talking about different ways to look at a stream - the input side and the output side. It's all a matter of perspective. An InputStream takes its input from some other source, and "outputs" it as the return values for read() methods. This output can be used as input by another InputStream, which calls read() on the first stream to "input" info, and then "outputs" info as return values to its own read() statements.
Similarly, an OutputStream takes whatever data is passed in a write() statement as its "input", and then "outputs" data to whatever the stream is connected to on the other end. If that's another OutputStream, then the output of the first stream is sent as input to the second stream via the second stream's write() statements.
I know this is confusing use of terminology, but it still seems the most applicable choice for describing FilterInputStream chaining. (Even though none of the answers address the "filter" part of it.)
"I'm not back." - Bill Harding, Twister