code: public String encode(Cookie cookie) {
          StringBuilder buf = stringBuilder();
          encode(buf, checkNotNull(cookie, "cookie"));
          return stripTrailingSeparator(buf);
      }
docs: Encodes the specified cookie into a Cookie header value.
  
  @param cookie the specified cookie
  @return a Rfc6265 style Cookie header value