code: public void printUsage(Writer out, ResourceBundle rb, OptionHandlerFilter filter) {
          PrintWriter w = new PrintWriter(out);
          // determine the length of the option + metavar first
          int len = 0;
          for (OptionHandler h : arguments) {
              int curLen = getPrefixLen(h, rb);
              len = Math.max(len,curLen);
          }
          for (OptionHandler h: options) {
              int curLen = getPrefixLen(h, rb);
              len = Math.max(len,curLen);
          }
  
          // then print
          for (OptionHandler h : arguments) {
          	printOption(w, h, len, rb, filter);
          }
          for (OptionHandler h : options) {
          	printOption(w, h, len, rb, filter);
          }
  
          w.flush();
      }
docs: Prints the list of all the non-hidden options and their usages to the screen.
  
  @param rb
  If non-{@code null}, {@link Option#usage()} is treated
  as a key to obtain the actual message from this resource bundle.
  @param filter
  Controls which options to be printed.