public final class DefaultHttpCookiePair extends java.lang.Object implements HttpCookiePair
HttpCookiePair
.Constructor and Description |
---|
DefaultHttpCookiePair(java.lang.CharSequence cookieName,
java.lang.CharSequence cookieValue)
Create a new instance.
|
DefaultHttpCookiePair(java.lang.CharSequence cookieName,
java.lang.CharSequence cookieValue,
boolean isWrapped)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.CharSequence |
encoded()
Get the encoded value of this
HttpCookiePair . |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isWrapped()
Returns
true if the value should be wrapped in DQUOTE as described in
cookie-value. |
java.lang.CharSequence |
name()
Returns the name of this
HttpCookiePair . |
static HttpCookiePair |
parseCookiePair(java.lang.CharSequence sequence,
int nameStart,
int valueEnd)
Parse a cookie-pair from
sequence . |
static HttpCookiePair |
parseCookiePair(java.lang.CharSequence sequence,
int nameStart,
int nameLength,
int valueEnd)
Parse a cookie-pair from
sequence . |
java.lang.String |
toString() |
java.lang.CharSequence |
value()
Returns the value of this
HttpCookiePair . |
public DefaultHttpCookiePair(java.lang.CharSequence cookieName, java.lang.CharSequence cookieValue)
cookieName
- The cookie-name.cookieValue
- The cookie-value.public DefaultHttpCookiePair(java.lang.CharSequence cookieName, java.lang.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(java.lang.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(java.lang.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 java.lang.CharSequence name()
HttpCookiePair
HttpCookiePair
.name
in interface HttpCookiePair
HttpCookiePair
public java.lang.CharSequence value()
HttpCookiePair
HttpCookiePair
.value
in interface HttpCookiePair
HttpCookiePair
public boolean isWrapped()
HttpCookiePair
true
if the value should be wrapped in DQUOTE as described in
cookie-value.isWrapped
in interface HttpCookiePair
true
if the value should be wrapped in DQUOTE as described in
cookie-value.public java.lang.CharSequence encoded()
HttpCookiePair
HttpCookiePair
.encoded
in interface HttpCookiePair
HttpCookiePair
.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object