public class HttpCookie
extends java.lang.Object
Constructor and Description |
---|
HttpCookie(java.lang.String name,
java.lang.String value)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
HttpCookie |
clone() |
java.lang.String |
getAttribute(java.lang.String name)
Query a generic attribute of this cookie.
|
java.lang.String |
getComment()
Query the comment attribute of this cookie.
|
java.lang.String |
getDomain()
Query the domain attribute of this cookie.
|
int |
getMaxAge()
Query the max-age attribute of this cookie.
|
java.lang.String |
getName()
Query the name of this cookie.
|
java.lang.String |
getPath()
Query the path attribute of this cookie.
|
java.lang.String |
getValue()
Query the value of this cookie.
|
int |
getVersion()
Query the version attribute of this cookie.
|
boolean |
isDiscard()
Query if the Discard attribute is set.
|
boolean |
isHttpOnly()
Query if the HttpOnly attribute is set.
|
boolean |
isSecure()
Query the secure-flag attribute of this cookie.
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
Set a generic attribute on this cookie.
|
void |
setComment(java.lang.String comment)
Set the comment attribute of this cookie.
|
void |
setDiscard(boolean flag)
Set the Discard attribute flag.
|
void |
setDomain(java.lang.String domain)
Set the domain attribute of this cookie.
|
void |
setHttpOnly(boolean flag)
Set the HttpOnly special attribute flag.
|
void |
setMaxAge(int age)
Set the max-age attribute of this cookie.
|
void |
setPath(java.lang.String path)
Set the path attribute of this cookie.
|
void |
setSecure(boolean flag)
Set the secure-flag attribute of this cookie.
|
void |
setVersion(int version)
Set the version attribute of this cookie to the input value.
|
public HttpCookie(java.lang.String name, java.lang.String value)
name
- value
- public java.lang.String getName()
public java.lang.String getValue()
public java.lang.String getComment()
public java.lang.String getPath()
public java.lang.String getDomain()
public boolean isSecure()
public int getMaxAge()
public void setAttribute(java.lang.String name, java.lang.String value)
name
- value
- public java.lang.String getAttribute(java.lang.String name)
name
- public int getVersion()
public void setVersion(int version)
version
- public void setComment(java.lang.String comment)
comment
- public void setDomain(java.lang.String domain)
domain
- public void setPath(java.lang.String path)
path
- public void setSecure(boolean flag)
flag
- public void setMaxAge(int age)
age
- public boolean isHttpOnly()
public void setHttpOnly(boolean flag)
flag
- public boolean isDiscard()
public void setDiscard(boolean flag)
flag
- public HttpCookie clone()
clone
in class java.lang.Object