code: public static void copyDirective(HashMap<String, String> directives,
              StringBuilder sb, String directive) {
          String directiveValue = directives.get(directive);
          if (directiveValue != null) {
              sb.append(directive).append(" = \"").append(directiveValue).append(
                      "\", ");
          }
      }
docs: Copy the directive to the {@link StringBuilder} if not null.
  (A directive is a parameter of the digest authentication process.)
  
  @param directives the directives map
  @param sb the output buffer
  @param directive the directive name to look for