Android APIs
public interface

SetCookie

implements Cookie
org.apache.http.cookie.SetCookie
Known Indirect Subclasses

Class Overview

This interface represents a SetCookie response header sent by the origin server to the HTTP agent in order to maintain a conversational state.

Summary

Public Methods
abstract void setComment(String comment)
If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described using this comment.
abstract void setDomain(String domain)
Sets the domain attribute.
abstract void setExpiryDate(Date expiryDate)
Sets expiration date.
abstract void setPath(String path)
Sets the path attribute.
abstract void setSecure(boolean secure)
Sets the secure attribute of the cookie.
abstract void setValue(String value)
abstract void setVersion(int version)
Sets the version of the cookie specification to which this cookie conforms.
[Expand]
Inherited Methods
From interface org.apache.http.cookie.Cookie

Public Methods

public abstract void setComment (String comment)

Added in API level 1

If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described using this comment.

See Also

public abstract void setDomain (String domain)

Added in API level 1

Sets the domain attribute.

Parameters
domain The value of the domain attribute
See Also

public abstract void setExpiryDate (Date expiryDate)

Added in API level 1

Sets expiration date.

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.

Parameters
expiryDate the Date after which this cookie is no longer valid.
See Also

public abstract void setPath (String path)

Added in API level 1

Sets the path attribute.

Parameters
path The value of the path attribute
See Also

public abstract void setSecure (boolean secure)

Added in API level 1

Sets the secure attribute of the cookie.

When true the cookie should only be sent using a secure protocol (https). This should only be set when the cookie's originating server used a secure protocol to set the cookie's value.

Parameters
secure The value of the secure attribute
See Also

public abstract void setValue (String value)

Added in API level 1

public abstract void setVersion (int version)

Added in API level 1

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

Parameters
version the version of the cookie.
See Also