All Packages Class Hierarchy This Package Previous Next Index
Class HTTPClient.Cookie
java.lang.Object
|
+----HTTPClient.Cookie
- public class Cookie
- extends Object
This class represents an http cookie as specified in
Netscape's
cookie spec
- Since:
- V0.3
- Version:
- 0.3 30/01/1998
- Author:
- Ronald Tschalär
-
discard()
-
-
equals(Object)
- Two cookies match if the name, path and domain match.
-
expires()
-
-
getDomain()
- Return the domain this cookie is valid in.
-
getName()
- Return the name of this cookie.
-
getPath()
- Return the path this cookie is associated with.
-
getValue()
- Return the value of this cookie.
-
hasExpired()
-
-
hashCode()
- Hash up name, path and domain into new hash.
-
isSecure()
- Return whether this cookie should only be sent over secure connections.
-
toString()
- Create a string containing all the cookie fields.
getName
public String getName()
- Return the name of this cookie.
getValue
public String getValue()
- Return the value of this cookie.
expires
public Date expires()
- Returns:
- the expiry date of this cookie, or null if none set.
discard
public boolean discard()
- Returns:
- true if the cookie should be discarded at the end of the
session; false otherwise
getDomain
public String getDomain()
- Return the domain this cookie is valid in.
getPath
public 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()
- Returns:
- true if this cookie has expired
hashCode
public int hashCode()
- Hash up name, path and domain into new hash.
- Overrides:
- hashCode in class Object
equals
public boolean equals(Object obj)
- Two cookies match if the name, path and domain match.
- Overrides:
- equals in class Object
toString
public String toString()
- Create a string containing all the cookie fields. The format is that
used in the Set-Cookie header.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index