Top Description Fields Constructors Methods
org.apache.http.impl.cookie

public Class BrowserCompatSpec

extends CookieSpecBase
Class Inheritance
Annotations
@Deprecated
@Contract
threading:SAFE
Imports
java.util.ArrayList, .Collections, .List, .Locale, org.apache.http.FormattedHeader, .Header, .HeaderElement, .NameValuePair, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.client.utils.DateUtils, org.apache.http.cookie.Cookie, .CookieAttributeHandler, .CookieOrigin, .MalformedCookieException, .SM, org.apache.http.message.BasicHeaderElement, .BasicHeaderValueFormatter, .BufferedHeader, .ParserCursor, org.apache.http.util.Args, .CharArrayBuffer

Deprecated

(4.4) use org.apache.http.impl.cookie.DefaultCookieSpec.

Cookie specification that strives to closely mimic (mis)behavior of common web browser applications such as Microsoft Internet Explorer and Mozilla FireFox.
Since
4.0

Field Summary

Modifier and TypeField and Description
private static final String[]

Constructor Summary

AccessConstructor and Description
public
BrowserCompatSpec(final String[] datepatterns, final BrowserCompatSpecFactory.SecurityLevel securityLevel)

Default constructor

public
BrowserCompatSpec(final String[] datepatterns)

Default constructor

public
BrowserCompatSpec()

Default constructor

Method Summary

Modifier and TypeMethod and Description
public List<Header>
formatCookies(final List<Cookie>
the Cookies format into a Cookie header
cookies
)

Implements org.apache.http.cookie.CookieSpec.formatCookies.

Create "Cookie" headers for an array of Cookies.
public int
getVersion()

Implements org.apache.http.cookie.CookieSpec.getVersion.

Returns version of the state management this cookie specification conforms to.
public Header
getVersionHeader()

Implements org.apache.http.cookie.CookieSpec.getVersionHeader.

Returns a request header identifying what version of the state management specification is understood.
private static boolean
public List<Cookie>
parse(final Header
the Set-Cookie received from the server
header
,
final CookieOrigin
details of the cookie origin
origin
)

Implements org.apache.http.cookie.CookieSpec.parse.

Parse the "Set-Cookie" Header into an array of Cookies.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.apache.http.impl.cookie.CookieSpecBase:
getDefaultDomaingetDefaultPathmatchparsevalidate

Field Detail

DEFAULT_DATE_PATTERNSback to summary
private static final String[] DEFAULT_DATE_PATTERNS

Constructor Detail

BrowserCompatSpecback to summary
public BrowserCompatSpec(final String[] datepatterns, final BrowserCompatSpecFactory.SecurityLevel securityLevel)

Default constructor

BrowserCompatSpecback to summary
public BrowserCompatSpec(final String[] datepatterns)

Default constructor

BrowserCompatSpecback to summary
public BrowserCompatSpec()

Default constructor

Method Detail

formatCookiesback to summary
public List<Header> formatCookies(final List<Cookie> cookies)

Implements org.apache.http.cookie.CookieSpec.formatCookies.

Doc from org.apache.http.cookie.CookieSpec.formatCookies.

Create "Cookie" headers for an array of Cookies.

Parameters
cookies:List<Cookie>

the Cookies format into a Cookie header

Returns:List<Header>

a Header for the given Cookies.

Annotations
@Override
getVersionback to summary
public int getVersion()

Implements org.apache.http.cookie.CookieSpec.getVersion.

Doc from org.apache.http.cookie.CookieSpec.getVersion.

Returns version of the state management this cookie specification conforms to.

Returns:int

version of the state management specification

Annotations
@Override
getVersionHeaderback to summary
public Header getVersionHeader()

Implements org.apache.http.cookie.CookieSpec.getVersionHeader.

Doc from org.apache.http.cookie.CookieSpec.getVersionHeader.

Returns a request header identifying what version of the state management specification is understood. May be null if the cookie specification does not support Cookie2 header.

Annotations
@Override
isQuoteEnclosedback to summary
private static boolean isQuoteEnclosed(final String s)
parseback to summary
public List<Cookie> parse(final Header header, final CookieOrigin origin) throws MalformedCookieException

Implements org.apache.http.cookie.CookieSpec.parse.

Doc from org.apache.http.cookie.CookieSpec.parse.

Parse the "Set-Cookie" Header into an array of Cookies.

This method will not perform the validation of the resultant Cookies

Parameters
header:Header

the Set-Cookie received from the server

origin:CookieOrigin

details of the cookie origin

Returns:List<Cookie>

an array of Cookies parsed from the header

Annotations
@Override
Exceptions
MalformedCookieException:
if an exception occurs during parsing
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override