code: public Integer getCookieToInt(String name, Integer defaultValue) {
  		String result = getCookie(name);
  		return result != null ? Integer.parseInt(result) : defaultValue;
  	}
docs: Get cookie value by cookie name and convert to Integer.