|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.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 | |
---|---|
boolean |
equals(java.lang.Object obj)
Compare for equality |
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 |
int |
hashCode()
Generate a hashcode by hashing all of the cookies properties |
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, finalize, getClass, 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 complies
IllegalArgumentException
- if name is nullpublic 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 valid
IllegalArgumentException
- if name is nullpublic Cookie(java.lang.String name, java.lang.String value)
name
- the name of the cookievalue
- the value of the cookie
IllegalArgumentException
- if name is nullMethod Detail |
---|
public static Cookie valueOf(java.lang.String value) throws java.lang.IllegalArgumentException
value
- the cookie string
IllegalArgumentException
- if the supplied string cannot be parsed
or is nullpublic 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
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare to
Cookie
with the same value for
all properties, false otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41