docs: private static Thread createAsyncStreamThread(final InputStream input,
                                                  final StringBuilder processOutputStringBuilder,
                                                  final boolean isVerbose) {
      Thread thread = new Thread() {
        @Override
        public void run() {
          // do not buffer
          LOG.log(Level.FINE, "Process output (stdout+stderr):");
          BufferedReader reader = new BufferedReader(new InputStreamReader(input), 1);
          while (true) {
            String line = null;
            try {
              line = reader.readLine();
            } catch (IOException e) {
              LOG.log(Level.SEVERE, "Error when reading line from subprocess", e);
            }
            if (line == null) {
              break;
            } else {
              if (isVerbose) {
                System.err.println(line);
              }
              if (processOutputStringBuilder != null) {
                processOutputStringBuilder.append(line);
              }
            }
          }
          try {
            input.close();
          } catch (IOException e) {
            LOG.log(Level.WARNING, "Failed to close the input stream", e);
          }
        }
      };
      thread.setDaemon(true);
      return thread;
    }