Code example for PipedOutputStream

0
 */ 
public class TestFanOutStreamSenderAndStreamReceiver 
  extends AbstractSenderAndReceiverTests { 
 
  @Before public void setUp() throws Exception { 
    final PipedOutputStream outputStream = new PipedOutputStream(); 
    final InputStream inputStream = new BigBufferPipedInputStream(outputStream); 
 
    final FanOutStreamSender fanOutStreamSender = new FanOutStreamSender(3); 
    fanOutStreamSender.add(outputStream); 
 
    initialise(new StreamReceiver(inputStream), fanOutStreamSender); 
  } 
}