net.sf.antcontrib.net

Class PostTask.Cookie

Enclosing Class:
PostTask

public class PostTask.Cookie
extends java.lang.Object

Represents a cookie. See RFC 2109 and 2965.

Constructor Summary

Cookie(String raw)
Cookie(String name, String value)

Method Summary

String
getDomain()
String
getId()
String
getName()
String
getPath()
String
getValue()
void
setDomain(String domain)
void
setPath(String path)
String
toString()

Constructor Details

Cookie

public Cookie(String raw)
Parameters:
raw - the raw string abstracted from the header of an http response for a single cookie.

Cookie

public Cookie(String name,
              String value)
Parameters:
name - name of the cookie
value - the value of the cookie

Method Details

getDomain

public String getDomain()
Returns:
the domain of the cookie

getId

public String getId()
Returns:
the id of the cookie, used internally by Post to store the cookie in a hashtable.

getName

public String getName()
Returns:
the name of the cookie

getPath

public String getPath()
Returns:
the path of the cookie

getValue

public String getValue()
Returns:
the value of the cookie

setDomain

public void setDomain(String domain)
Parameters:

setPath

public void setPath(String path)
Parameters:
path - the path of the cookie

toString

public String toString()
Returns:
a Cookie formatted as a Cookie Version 1 string. The returned string is suitable for including with an http request.