com.sun.xml.ws.transport.http.client
Class HttpCookie

java.lang.Object
  extended by com.sun.xml.ws.transport.http.client.HttpCookie

public class HttpCookie
extends Object

An object which represents an HTTP cookie. Can be constructed by parsing a string from the set-cookie: header. Syntax: Set-Cookie: NAME=VALUE; expires=DATE; path=PATH; domain=DOMAIN_NAME; secure All but the first field are optional.


Constructor Summary
HttpCookie(Date expirationDate, String nameAndValue, String path, String domain, boolean isSecure)
           
HttpCookie(String cookieString)
           
HttpCookie(URL url, String cookieString)
           
 
Method Summary
 String getDomain()
          Returns the domain of the cookie as it was presented
 Date getExpirationDate()
           
 String getName()
          Returns just the name part of the cookie
 String getNameValue()
           
 String getPath()
           
(package private)  boolean hasExpired()
           
(package private)  boolean isSaveable()
          Returns true if the cookie has an expiration date (meaning it's persistent), and if the date nas not expired;
 boolean isSecure()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpCookie

public HttpCookie(String cookieString)

HttpCookie

public HttpCookie(Date expirationDate,
                  String nameAndValue,
                  String path,
                  String domain,
                  boolean isSecure)

HttpCookie

public HttpCookie(URL url,
                  String cookieString)
Method Detail

getNameValue

public String getNameValue()

getName

public String getName()
Returns just the name part of the cookie


getDomain

public String getDomain()
Returns the domain of the cookie as it was presented


getPath

public String getPath()

getExpirationDate

public Date getExpirationDate()

hasExpired

boolean hasExpired()

isSaveable

boolean isSaveable()
Returns true if the cookie has an expiration date (meaning it's persistent), and if the date nas not expired;


isSecure

public boolean isSecure()

toString

public String toString()
Overrides:
toString in class Object