Cookie学习,练习代码
Cookie定义:
?
private String getCookieValue(Cookie[] cookies,String name){if(cookies==null){return null;}for(Cookie cookie:cookies){if(cookie.getName().equals(name)){return cookie.getValue();}}return null;}
?没有Cookie的更新,只是自己练习的代码。