docs: private PrintStream createOutputStream() {
          if (outputLogFilename != null) {
              try {
                  FileOutputStream fout = new FileOutputStream(outputLogFilename, false);
                  BufferedOutputStream bos = new BufferedOutputStream(fout, 4096);
                  // We are using a PrintStream for output to match System.out
                  if (encoding != null) {
                      return new PrintStream(bos, false, encoding);
                  } else {
                      return new PrintStream(bos, false);
                  }
              } catch (IOException e) {
                  throw new IllegalArgumentException(getLocalizedString("CWTRA0005E"));
              }
          }
  
          // No output filename specified.
          isSystemOut = true;
          if (encoding != null) {
              try {
                  // Encode output before directing it into System.out
                  return new PrintStream(System.out, false, encoding);
              } catch (UnsupportedEncodingException e) {
                  // We already checked that encoding is supported
              }
          }
          return System.out;
      }