gnu.inet.http

Class Cookie


public class Cookie
extends java.lang.Object

An HTTP cookie, as specified in RFC 2109.
Author:
Chris Burdess

Field Summary

protected String
comment
Optional documentation of the intended use of the cookie.
protected String
domain
The domain for which the cookie is valid.
protected Date
expires
The date at which this cookie expires.
protected String
name
The name of the cookie.
protected String
path
Optional subset of URL paths within the domain for which the cookie is valid.
protected boolean
secure
Indicates that the user-agent should only use secure means to transmit this cookie to the server.
protected String
value
The value of the cookie.

Constructor Summary

Cookie(String name, String value, String comment, String domain, String path, boolean secure, Date expires)

Method Summary

String
getComment()
String
getDomain()
Date
getExpiryDate()
String
getName()
String
getPath()
String
getValue()
boolean
isSecure()
String
toString()
String
toString(boolean showPath, boolean showDomain)

Field Details

comment

protected final String comment
Optional documentation of the intended use of the cookie.

domain

protected final String domain
The domain for which the cookie is valid.

expires

protected final Date expires
The date at which this cookie expires.

name

protected final String name
The name of the cookie.

path

protected final String path
Optional subset of URL paths within the domain for which the cookie is valid.

secure

protected final boolean secure
Indicates that the user-agent should only use secure means to transmit this cookie to the server.

value

protected final String value
The value of the cookie.

Constructor Details

Cookie

public Cookie(String name,
              String value,
              String comment,
              String domain,
              String path,
              boolean secure,
              Date expires)

Method Details

getComment

public String getComment()

getDomain

public String getDomain()

getExpiryDate

public Date getExpiryDate()

getName

public String getName()

getPath

public String getPath()

getValue

public String getValue()

isSecure

public boolean isSecure()

toString

public String toString()

toString

public String toString(boolean showPath,
                       boolean showDomain)

© Copyright 2003 The Free Software Foundation, all rights reserved