code: public void stop() {
      if (inputThread != null) {
        if (inputStreamPumper != null) {
          inputStreamPumper.stopProcessing();
        }
        // #33 Interrupt reading from a PipedInputStream to unblock the pumping thread
        inputThread.interrupt();
        log.trace("Joining input thread {}...", inputThread);
        try {
          inputThread.join();
          inputThread = null;
        }
        catch (InterruptedException e) {
          // ignore
        }
      }
  
      if (outputThread != null) {
        log.trace("Joining output thread {}...", outputThread);
        try {
          outputThread.join();
          outputThread = null;
        }
        catch (InterruptedException e) {
          // ignore
        }
      }
  
      if (errorThread != null) {
        log.trace("Joining error thread {}...", errorThread);
        try {
          errorThread.join();
          errorThread = null;
        }
        catch (InterruptedException e) {
          // ignore
        }
      }
  
      flush();
    }
docs: Stop pumping the streams.