This class is used to represent a generic cookie. This exposes the fields that a cookie can have. By default the version of the
Cookie
is set to 1. The version can be configured using the
setVersion
method. The domain, path, security, and expiry of the cookie can also be set using their respective set methods.
The toString
method allows the Cookie
to be converted back into text form. This text form converts the cookie according to the Set-Cookie header form. This is done so that a created Cookie
instance can be converted to a string which can be used as a a HTTP header.
@author Niall Gallagher