「Java」クッキーCookieを取得するコード
//COOKIEの取得
public String getCookieValue(Cookie[] cookies, String cookieName) {
for (int i = 0; i < cookies.length; i++) {
Cookie cookie = cookies[i];
if (cookieName.equals(cookie.getName())) {
return (cookie.getValue());
}
}
return null;
}