code: public void decodeStreams(List<IEvent> events, Writer sysout, Writer syserr) throws IOException {
      int lineBuffer = 160; 
      WriterOutputStream stdout = new WriterOutputStream(sysout, getCharset(), lineBuffer, true);
      WriterOutputStream stderr = new WriterOutputStream(syserr, getCharset(), lineBuffer, true);
      for (IEvent evt : events) {
        switch (evt.getType()) {
          case APPEND_STDOUT:
            if (sysout != null) {
              ((IStreamEvent) evt).copyTo(stdout);
            }
            break;
  
          case APPEND_STDERR:
            if (syserr != null) {
              ((IStreamEvent) evt).copyTo(stderr);
            }
            break;
  
          default:
            break;
      }
      }
  
      stdout.flush();
      stderr.flush();
    }
docs: Filter through events looking for sysouts and syserrs and decode them
  into a character streams. If both {@link Writer} arguments are the same object
  the streams will be combined.