code: public void printHelp(PrintWriter pw, int width, String cmdLineSyntax,
                            String header, Options options, int leftPad,
                            int descPad, String footer, boolean autoUsage)
      {
          if (cmdLineSyntax == null || cmdLineSyntax.length() == 0)
          {
              throw new IllegalArgumentException("cmdLineSyntax not provided");
          }
  
          if (autoUsage)
          {
              printUsage(pw, width, cmdLineSyntax, options);
          }
          else
          {
              printUsage(pw, width, cmdLineSyntax);
          }
  
          if (header != null && header.trim().length() > 0)
          {
              printWrapped(pw, width, header);
          }
  
          printOptions(pw, width, options, leftPad, descPad);
  
          if (footer != null && footer.trim().length() > 0)
          {
              printWrapped(pw, width, footer);
          }
      }
docs: Print the help for <code>options</code> with the specified
  command line syntax.
  
  @param pw the writer to which the help will be written
  @param width the number of characters to be displayed on each line
  @param cmdLineSyntax the syntax for this application
  @param header the banner to display at the beginning of the help
  @param options the Options instance
  @param leftPad the number of characters of padding to be prefixed
  to each line
  @param descPad the number of characters of padding to be prefixed
  to each description line
  @param footer the banner to display at the end of the help
  @param autoUsage whether to print an automatically generated
  usage statement
  
  @throws IllegalStateException if there is no room to print a line