public final class DefaultHttpCookiePair extends Object implements HttpCookiePair
HttpCookiePair.| Constructor and Description |
|---|
DefaultHttpCookiePair(CharSequence cookieName,
CharSequence cookieValue)
Create a new instance.
|
DefaultHttpCookiePair(CharSequence cookieName,
CharSequence cookieValue,
boolean isWrapped)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
encoded()
Get the encoded value of this
HttpCookiePair. |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isWrapped()
Returns
true if the value should be wrapped in DQUOTE as described in
cookie-value. |
CharSequence |
name()
Returns the name of this
HttpCookiePair. |
static HttpCookiePair |
parseCookiePair(CharSequence sequence,
int nameStart,
int valueEnd)
Parse a cookie-pair from
sequence. |
static HttpCookiePair |
parseCookiePair(CharSequence sequence,
int nameStart,
int nameLength,
int valueEnd)
Parse a cookie-pair from
sequence. |
String |
toString() |
CharSequence |
value()
Returns the value of this
HttpCookiePair. |
public DefaultHttpCookiePair(CharSequence cookieName,
CharSequence cookieValue)
cookieName - The cookie-name.cookieValue - The cookie-value.public DefaultHttpCookiePair(CharSequence cookieName,
CharSequence cookieValue,
boolean isWrapped)
cookieName - The cookie-name.cookieValue - The cookie-value.isWrapped - true if the value should be wrapped in DQUOTE as described in
cookie-valuepublic static HttpCookiePair parseCookiePair(CharSequence sequence, int nameStart, int valueEnd)
sequence.sequence - The CharSequence that contains a
cookie-pair.nameStart - The index were the cookie-name
starts in sequence.valueEnd - The end index (exclusive) of the
cookie-pair in sequence.HttpCookiePair parsed from sequence.public static HttpCookiePair parseCookiePair(CharSequence sequence, int nameStart, int nameLength, int valueEnd)
sequence.sequence - The CharSequence that contains a
cookie-pair.nameStart - The index were the cookie-name
starts in sequence.nameLength - The length of the cookie-name.valueEnd - The end index (exclusive) of the
cookie-pair in sequence.HttpCookiePair parsed from sequence.public CharSequence name()
HttpCookiePairHttpCookiePair.name in interface HttpCookiePairHttpCookiePairpublic CharSequence value()
HttpCookiePairHttpCookiePair.value in interface HttpCookiePairHttpCookiePairpublic boolean isWrapped()
HttpCookiePairtrue if the value should be wrapped in DQUOTE as described in
cookie-value.isWrapped in interface HttpCookiePairtrue if the value should be wrapped in DQUOTE as described in
cookie-value.public CharSequence encoded()
HttpCookiePairHttpCookiePair.encoded in interface HttpCookiePairHttpCookiePair.public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object