public final class CookieUtils extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
ALWAYS_ADD_EXPIRES
If set to false, we don't use the IE6/7 Max-Age/Expires work around
|
static boolean |
COOKIE_VERSION_ONE_STRICT_COMPLIANCE
If set to true, then it will double quote the value and update cookie version
when there is special characters.
|
static ThreadLocal<SimpleDateFormat> |
OLD_COOKIE_FORMAT |
static boolean |
RFC_6265_SUPPORT_ENABLED |
Constructor and Description |
---|
CookieUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsCTL(String value,
int version) |
static boolean |
equals(String s,
Buffer b,
int start,
int end) |
static boolean |
equals(String s,
byte[] b,
int start,
int end) |
static boolean |
equals(String s1,
String s2,
int start,
int end) |
static boolean |
equalsIgnoreCase(String s,
Buffer b,
int start,
int end) |
static boolean |
equalsIgnoreCase(String s,
byte[] b,
int start,
int end) |
static boolean |
equalsIgnoreCase(String s1,
String s2,
int start,
int end) |
static int |
getQuotedValueEndPosition(Buffer buffer,
int off,
int end)
Given a starting position after an initial quote character, this gets
the position of the end quote.
|
static int |
getQuotedValueEndPosition(byte[] bytes,
int off,
int end)
Given a starting position after an initial quote character, this gets
the position of the end quote.
|
static int |
getQuotedValueEndPosition(String s,
int off,
int end)
Given a starting position after an initial quote character, this gets
the position of the end quote.
|
static int |
getTokenEndPosition(Buffer buffer,
int off,
int end)
Given the starting position of a token, this gets the end of the
token, with no separator characters in between.
|
static int |
getTokenEndPosition(Buffer buffer,
int off,
int end,
boolean parseAsVersion1) |
static int |
getTokenEndPosition(byte[] bytes,
int off,
int end)
Given the starting position of a token, this gets the end of the
token, with no separator characters in between.
|
static int |
getTokenEndPosition(byte[] bytes,
int off,
int end,
boolean parseAsVersion1) |
static int |
getTokenEndPosition(String s,
int off,
int end)
Given the starting position of a token, this gets the end of the
token, with no separator characters in between.
|
static int |
getTokenEndPosition(String s,
int off,
int end,
boolean parseAsVersion1) |
static boolean |
isSeparator(int c)
Returns true if the byte is a separator character as
defined in RFC2619.
|
static boolean |
isSeparator(int c,
boolean parseAsVersion1) |
static boolean |
isToken(String value) |
static boolean |
isToken(String value,
String literals) |
static boolean |
isToken2(String value) |
static boolean |
isToken2(String value,
String literals) |
static boolean |
isWhiteSpace(int c)
Returns true if the byte is a whitespace character as
defined in RFC2619.
|
public static final boolean COOKIE_VERSION_ONE_STRICT_COMPLIANCE
public static final boolean RFC_6265_SUPPORT_ENABLED
public static final boolean ALWAYS_ADD_EXPIRES
public static final ThreadLocal<SimpleDateFormat> OLD_COOKIE_FORMAT
public static boolean isToken(String value)
public static boolean containsCTL(String value, int version)
public static boolean isToken2(String value)
public static boolean equals(String s, byte[] b, int start, int end)
public static boolean equalsIgnoreCase(String s, byte[] b, int start, int end)
public static boolean isSeparator(int c)
public static boolean isSeparator(int c, boolean parseAsVersion1)
public static boolean isWhiteSpace(int c)
public static int getTokenEndPosition(Buffer buffer, int off, int end)
public static int getTokenEndPosition(Buffer buffer, int off, int end, boolean parseAsVersion1)
public static int getTokenEndPosition(byte[] bytes, int off, int end)
public static int getTokenEndPosition(byte[] bytes, int off, int end, boolean parseAsVersion1)
public static int getTokenEndPosition(String s, int off, int end)
public static int getTokenEndPosition(String s, int off, int end, boolean parseAsVersion1)
public static int getQuotedValueEndPosition(Buffer buffer, int off, int end)
public static int getQuotedValueEndPosition(byte[] bytes, int off, int end)
public static int getQuotedValueEndPosition(String s, int off, int end)
Copyright © 2014 Oracle Corporation. All rights reserved.