|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.ws.rs.core.Cookie
public class Cookie
Represents the value of a HTTP cookie, transferred in a request. RFC 2109 specifies the legal characters for name, value, path and domain. The default version of 1 corresponds to RFC 2109.
Field Summary | |
---|---|
static int |
DEFAULT_VERSION
Cookies using the default version correspond to RFC 2109. |
Constructor Summary | |
---|---|
Cookie(java.lang.String name,
java.lang.String value)
Create a new instance. |
|
Cookie(java.lang.String name,
java.lang.String value,
java.lang.String path,
java.lang.String domain)
Create a new instance. |
|
Cookie(java.lang.String name,
java.lang.String value,
java.lang.String path,
java.lang.String domain,
int version)
Create a new instance. |
Method Summary | |
---|---|
java.lang.String |
getDomain()
Get the domain of the cookie |
java.lang.String |
getName()
Get the name of the cookie |
java.lang.String |
getPath()
Get the path of the cookie |
java.lang.String |
getValue()
Get the value of the cookie |
int |
getVersion()
Get the version of the cookie |
java.lang.String |
toString()
Convert the cookie to a string suitable for use as the value of the corresponding HTTP header. |
static Cookie |
valueOf(java.lang.String value)
Creates a new instance of Cookie by parsing the supplied string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_VERSION
Constructor Detail |
---|
public Cookie(java.lang.String name, java.lang.String value, java.lang.String path, java.lang.String domain, int version)
name
- the name of the cookievalue
- the value of the cookiepath
- the URI path for which the cookie is validdomain
- the host domain for which the cookie is validversion
- the version of the specification to which the cookie compliespublic Cookie(java.lang.String name, java.lang.String value, java.lang.String path, java.lang.String domain)
name
- the name of the cookievalue
- the value of the cookiepath
- the URI path for which the cookie is validdomain
- the host domain for which the cookie is validpublic Cookie(java.lang.String name, java.lang.String value)
name
- the name of the cookievalue
- the value of the cookieMethod Detail |
---|
public static Cookie valueOf(java.lang.String value) throws java.lang.IllegalArgumentException
value
- the cookie string
java.lang.IllegalArgumentException
- if the supplied string cannot be parsedpublic java.lang.String getName()
public java.lang.String getValue()
public int getVersion()
public java.lang.String getDomain()
public java.lang.String getPath()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |