Android
org.apache.http.cookie
public interface

org.apache.http.cookie.Cookie

org.apache.http.cookie.Cookie

HTTP "magic-cookie" represents a piece of state information that the HTTP agent and the target server can exchange to maintain a session.

Known Indirect Subclasses

Summary

Public Methods

          String  getComment()
Returns the comment describing the purpose of this cookie, or null if no such comment has been defined.
          String  getCommentURL()
If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described by the information at this URL.
          String  getDomain()
Returns domain attribute of the cookie.
          Date  getExpiryDate()
Returns the expiration Date of the cookie, or null if none exists.
          String  getName()
Returns the name.
          String  getPath()
Returns the path attribute of the cookie
          int[]  getPorts()
Get the Port attribute.
          String  getValue()
Returns the value.
          int  getVersion()
Returns the version of the cookie specification to which this cookie conforms.
          boolean  isExpired(Date date)
Returns true if this cookie has expired.
          boolean  isPersistent()
Returns false if the cookie should be discarded at the end of the "session"; true otherwise.
          boolean  isSecure()
Indicates whether this cookie requires a secure connection.

Details

Public Methods

public String getComment()

Returns the comment describing the purpose of this cookie, or null if no such comment has been defined.

Returns

  • comment

public String getCommentURL()

If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described by the information at this URL.

public String getDomain()

Returns domain attribute of the cookie.

Returns

  • the value of the domain attribute

public Date getExpiryDate()

Returns the expiration Date of the cookie, or null if none exists.

Note: the object returned by this method is considered immutable. Changing it (e.g. using setTime()) could result in undefined behaviour. Do so at your peril.

Returns

  • Expiration Date, or null.

public String getName()

Returns the name.

Returns

  • String name The name

public String getPath()

Returns the path attribute of the cookie

Returns

  • The value of the path attribute.

public int[] getPorts()

Get the Port attribute. It restricts the ports to which a cookie may be returned in a Cookie request header.

public String getValue()

Returns the value.

Returns

  • String value The current value.

public int getVersion()

Returns the version of the cookie specification to which this cookie conforms.

Returns

  • the version of the cookie.

public boolean isExpired(Date date)

Returns true if this cookie has expired.

Parameters

date Current time

Returns

  • true if the cookie has expired.

public boolean isPersistent()

Returns false if the cookie should be discarded at the end of the "session"; true otherwise.

Returns

  • false if the cookie should be discarded at the end of the "session"; true otherwise

public boolean isSecure()

Indicates whether this cookie requires a secure connection.

Returns

  • true if this cookie should only be sent over secure connections, false otherwise.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48