We used CompositeOutputStream in the HTTPGateway. It is nice thing when you are dealing with multiple output streams. It has tokens to identify them.