public class Cookie extends Object
Constructor and Description |
---|
Cookie() |
Cookie(String domain,
String name,
String value,
Long maxAge)
创建一个 Cookie
|
Modifier and Type | Method and Description |
---|---|
static Cookie |
buildCookie(Map<String,String> cookieMap)
通过 Map 构建一个 Cookie 对象
|
String |
getDomain() |
static Map<String,String> |
getEqualMap(String cookieline) |
String |
getExpires() |
Long |
getMaxAge() |
String |
getName() |
String |
getPath() |
String |
getValue() |
boolean |
isHttpOnly() |
boolean |
isSecure() |
static String[] |
searchByRegex(String source,
String regex) |
void |
setDomain(String domain) |
void |
setExpires(String expires) |
void |
setHttpOnly(boolean httpOnly) |
void |
setMaxAge(Long maxAge) |
void |
setName(String name) |
void |
setPath(String path) |
void |
setSecure(boolean secure) |
void |
setValue(String value) |
String |
toString() |
public static Cookie buildCookie(Map<String,String> cookieMap)
cookieMap
- Cookie 属性 Mappublic String getDomain()
public String getExpires()
public Long getMaxAge()
public String getName()
public String getPath()
public String getValue()
public boolean isHttpOnly()
public boolean isSecure()
public void setDomain(String domain)
public void setExpires(String expires)
public void setHttpOnly(boolean httpOnly)
public void setMaxAge(Long maxAge)
public void setName(String name)
public void setPath(String path)
public void setSecure(boolean secure)
public void setValue(String value)
Copyright © 2018. All rights reserved.