code: public static void title(Writer writer, String title) throws IOException {
          if (title == null || title.isEmpty()) {
              return;
          }
          String out = String.format("%s\n%s\n\n", title,
                  Stream.generate(() -> "=").limit(title.length()).collect(Collectors.joining()));
          writer.write(out);
      }
docs: Simple helper method that prints the specified title, underlined with '='
  characters.
  
  @param writer
  the writer to write the title to.
  @param title
  the title to print (null or empty titles will be ignored).
  @throws IOException
  if the writer fails.