|
|||||||||
| Home >> All >> [ HTTPClient overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
HTTPClient
Class Cookie

java.lang.ObjectHTTPClient.Cookie
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- Cookie2
- public class Cookie
- extends java.lang.Object
- implements java.io.Serializable
- extends java.lang.Object
This class represents an http cookie as specified in Netscape's cookie spec
- Since:
- V0.3
- Version:
- 0.3-2 18/06/1999
| Field Summary | |
protected java.lang.String |
domain
|
protected java.util.Date |
expires
|
protected java.lang.String |
name
|
protected java.lang.String |
path
|
protected boolean |
secure
|
protected java.lang.String |
value
|
| Constructor Summary | |
protected |
Cookie(RoRequest req)
Use parse() to create cookies. |
|
Cookie(java.lang.String name,
java.lang.String value,
java.lang.String domain,
java.lang.String path,
java.util.Date expires,
boolean secure)
Create a cookie. |
| Method Summary | |
boolean |
discard()
|
boolean |
equals(java.lang.Object obj)
Two cookies match if the name, path and domain match. |
java.util.Date |
expires()
|
java.lang.String |
getDomain()
Return the domain this cookie is valid in. |
java.lang.String |
getName()
Return the name of this cookie. |
java.lang.String |
getPath()
Return the path this cookie is associated with. |
java.lang.String |
getValue()
Return the value of this cookie. |
boolean |
hasExpired()
|
int |
hashCode()
Hash up name, path and domain into new hash. |
boolean |
isSecure()
Return whether this cookie should only be sent over secure connections. |
protected static Cookie[] |
parse(java.lang.String set_cookie,
RoRequest req)
Parses the Set-Cookie header into an array of Cookies. |
protected boolean |
sendWith(RoRequest req)
|
protected java.lang.String |
toExternalForm()
|
java.lang.String |
toString()
Create a string containing all the cookie fields. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
name
protected java.lang.String name
value
protected java.lang.String value
expires
protected java.util.Date expires
domain
protected java.lang.String domain
path
protected java.lang.String path
secure
protected boolean secure
| Constructor Detail |
Cookie
public Cookie(java.lang.String name, java.lang.String value, java.lang.String domain, java.lang.String path, java.util.Date expires, boolean secure)
- Create a cookie.
- Since:
- V0.3-1
Cookie
protected Cookie(RoRequest req)
- Use
parse()to create cookies.
| Method Detail |
parse
protected static Cookie[] parse(java.lang.String set_cookie, RoRequest req) throws java.net.ProtocolException
- Parses the Set-Cookie header into an array of Cookies.
getName
public java.lang.String getName()
- Return the name of this cookie.
getValue
public java.lang.String getValue()
- Return the value of this cookie.
expires
public java.util.Date expires()
discard
public boolean discard()
getDomain
public java.lang.String getDomain()
- Return the domain this cookie is valid in.
getPath
public java.lang.String getPath()
- Return the path this cookie is associated with.
isSecure
public boolean isSecure()
- Return whether this cookie should only be sent over secure connections.
hasExpired
public boolean hasExpired()
sendWith
protected boolean sendWith(RoRequest req)
hashCode
public int hashCode()
- Hash up name, path and domain into new hash.
equals
public boolean equals(java.lang.Object obj)
- Two cookies match if the name, path and domain match.
toExternalForm
protected java.lang.String toExternalForm()
toString
public java.lang.String toString()
- Create a string containing all the cookie fields. The format is that
used in the Set-Cookie header.
|
|||||||||
| Home >> All >> [ HTTPClient overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
HTTPClient.Cookie