@Override
  public void notifyTextAvailable(String text, Key outputType) {
    terminalOutputCapturer.onTextAvailable(new ProcessEvent(this, text), outputType);

    text = filterText(text);

    if (!StringUtil.isEmpty(text)) {
      StringBuilder lastLine = getLastLineFor(outputType);
      String currentLine = lastLine.append(text).toString();
      lastLine.setLength(0);

      currentLine = filterCombinedText(currentLine);

      // check if current line presents some interactive output
      boolean handled = handlePrompt(currentLine, outputType);
      if (!handled) {
        notify(currentLine, outputType, lastLine);
      }
    }
  }
 public String getErrorOutput() {
   return outputAdapter.getOutput().getStderr();
 }
 public String getTerminalOutput() {
   return terminalOutputCapturer.getOutput().getStdout();
 }
 public String getOutput() {
   return outputAdapter.getOutput().getStdout();
 }