code: public void setCookie(String name, String value, String path, long maxAge, boolean secure, boolean httpOnly) {
          Date now = new Date();
          Date expirationDate = new Date(now.getTime() + maxAge);
          setCookie(name, value, path, expirationDate, secure, httpOnly);
      }
docs: For java docs, see Replication.setCookie()