code: public boolean generalValidOptions(String options[][],
              DocErrorReporter reporter) {
          boolean docencodingfound = false;
          String encoding = "";
          for (int oi = 0; oi < options.length; oi++) {
              String[] os = options[oi];
              String opt = StringUtils.toLowerCase(os[0]);
              if (opt.equals("-docencoding")) {
                  docencodingfound = true;
                  if (!checkOutputFileEncoding(os[1], reporter)) {
                      return false;
                  }
              } else if (opt.equals("-encoding")) {
                  encoding = os[1];
              }
          }
          if (!docencodingfound && encoding.length() > 0) {
              if (!checkOutputFileEncoding(encoding, reporter)) {
                  return false;
              }
          }
          return true;
      }
docs: This checks for the validity of the options used by the user.
  This works exactly like
  {@link com.sun.javadoc.Doclet#validOptions(String[][],
  DocErrorReporter)}. This will validate the options which are shared
  by our doclets. For example, this method will flag an error using
  the DocErrorReporter if user has used "-nohelp" and "-helpfile" option
  together.
  
  @param options  options used on the command line.
  @param reporter used to report errors.
  @return true if all the options are valid.