// wrap a channel around stdout
WritableByteChannel out = Channels.newChannel (System.out);
// start worker and get read end of channel
ReadableByteChannel workerChannel = startWorker (10);
ByteBuffer buffer = ByteBuffer.allocate (100);
while (workerChannel.read (buffer) >= 0) {
buffer.flip();
out.write (buffer);
buffer.clear();
}