docs: public static String encodeCookie( Cookie cookie ) {
  
          StringBuilder buf = new StringBuilder(cookie.getName());
          buf.append("=");
          buf.append(cookie.getValue());
  
          String comment = cookie.getComment();
          if (comment != null) {
              buf.append("; Comment=\"");
              buf.append(comment);
              buf.append("\"");
          }
  
          String domain = cookie.getDomain();
          if (domain != null) {
              buf.append("; Domain=\"");
              buf.append(domain);
              buf.append("\"");
          }
  
          int age = cookie.getMaxAge();
          if (age >= 0) {
              buf.append("; Max-Age=\"");
              buf.append(age);
              buf.append("\"");
          }
  
          String path = cookie.getPath();
          if (path != null) {
              buf.append("; Path=\"");
              buf.append(path);
              buf.append("\"");
          }
  
          if (cookie.getSecure()) {
              buf.append("; Secure");
          }
  
          int version = cookie.getVersion();
          if (version > 0) {
              buf.append("; Version=\"");
              buf.append(version);
              buf.append("\"");
          }
  
          return (buf.toString());
      }