SequenceInputStream

Advertisement
Why is there a SequenceInputStream but no SequenceOutputStream?
How would you handle writing to multiple types of streams over a socket?
Advertisement

Replay

It's not at all obvious what a SequenceOutputStream would do. The way to write lots of stuff over a socket is to wrap multiple output streams round sock.getOutputStream and flush each one when you've finished with it. (There may be issues with compressed / bit output streams).