|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.util.net.Cookie
This class represents one cookie. A cookie is essentially an id tag sent to the browser in order to ID the user. Used for "shopping carts", etc
CookieManager,
Serialized Form| Constructor Summary | |
Cookie()
Construct an empty cookie. |
|
Cookie(String nameIn,
String valueIn,
String commentIn,
String domainIn,
int maxAgeIn,
String pathIn,
boolean secureIn,
Date expiresIn,
String versionIn)
Construct a cookie with the specified parameters |
|
| Method Summary | |
Date |
expirationDate()
Returns expiration date. |
String |
getComment()
Get the comment field of the cookie, if any. |
String |
getDomain()
Returns the cookie domain |
int |
getMaxAge()
Get the max age field of the cookie. |
String |
getName()
Returns the cookie name |
String |
getPath()
Returns the cookie path |
boolean |
getSecure()
Returns true if cookie is marked secure. |
String |
getValue()
Returns the cookie value |
String |
getVersion()
Get the version field of the cookie. |
boolean |
isExpired()
Returns true if the cookie has expired. |
boolean |
isSessionCookie()
Returns true if cookie is a session cookie. |
long |
lastUsed()
Returns the date this cookie was last used. |
static Cookie |
parseFromString(URL url,
String str)
Create a cookie from the supplied String. |
void |
setComment(String commentIn)
Set the comment field of the cookie. |
void |
setDomain(String domainIn)
Set the domain. |
void |
setExpirationDate(Date expiresIn)
Set the expiration date of the cookie. |
void |
setMaxAge(int maxAgeIn)
Set the max age field of the cookie. |
void |
setName(String nameIn)
Set the name |
void |
setPath(String pathIn)
Set the path |
void |
setSecure(boolean secureIn)
Set the secure flag on the cookie. |
void |
setValue(String valueIn)
|
void |
setVersion(String versionIn)
Set the version field of the cookie. |
int |
size()
Returns the size of the cookie in bytes. |
String |
toString()
Return a string representation of the cookie. |
String |
use()
Returns the string to apply to an http header. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Cookie()
public Cookie(String nameIn,
String valueIn,
String commentIn,
String domainIn,
int maxAgeIn,
String pathIn,
boolean secureIn,
Date expiresIn,
String versionIn)
| Method Detail |
public String toString()
public static Cookie parseFromString(URL url,
String str)
public boolean isExpired()
public boolean isSessionCookie()
public String use()
public long lastUsed()
public int size()
public Date expirationDate()
public void setExpirationDate(Date expiresIn)
public String getName()
public void setName(String nameIn)
public String getValue()
public void setValue(String valueIn)
public String getPath()
public void setPath(String pathIn)
public String getDomain()
public void setDomain(String domainIn)
public boolean getSecure()
public void setSecure(boolean secureIn)
public String getComment()
public void setComment(String commentIn)
public String getVersion()
public void setVersion(String versionIn)
public int getMaxAge()
public void setMaxAge(int maxAgeIn)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||