/**
* Example.
*/
public static void main(String args[]) {
Element source = new FakeSource("source") {
{
this.verbose = true;
this.numBuffers = 3;
this.incommingBufLength = 5;
this.delay = 100;
}
};
OutputStreamSink sink = new OutputStreamSink("sink") {
{
verbose = true;
}
};
Link link = new SyncLink();
source.setLink(STDOUT, link, Direction.OUT);
sink.setLink(STDIN, link, Direction.IN);
sink.setOutputStream(new ByteArrayOutputStream());
link.sendEvent(Event.STREAM_START, Direction.IN);