|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.core.header.GrammarUtil
public final class GrammarUtil
Class containing static utility methods to work with HTTP headers.
Field Summary | |
---|---|
static int |
COMMENT
Represents comment type in the TYPE_TABLE |
static int |
CONTROL
Represents control type in the TYPE_TABLE |
static boolean[] |
IS_TOKEN
convenience table mapping chars to true if they are tokens |
static boolean[] |
IS_WHITE_SPACE
Convenience table mapping chars to true if they are white space chars |
static int |
QUOTED_STRING
Represents quotes type in the TYPE_TABLE |
static int |
SEPARATOR
Represents separator type in the TYPE_TABLE |
static char[] |
SEPARATORS
Array of chars representing separators |
static int |
TOKEN
Represents token type in the TYPE_TABLE |
static int[] |
TYPE_TABLE
Mapping of chars to types |
static char[] |
WHITE_SPACE
Array of chars representing white spaces |
Constructor Summary | |
---|---|
GrammarUtil()
|
Method Summary | |
---|---|
static boolean |
containsWhiteSpace(java.lang.String s)
Returns true if string s contains a white space char. |
static java.lang.String |
filterToken(java.lang.String s,
int start,
int end)
|
static java.lang.String |
filterToken(java.lang.String s,
int start,
int end,
boolean preserveBackslash)
|
static boolean |
isToken(char c)
Returns true if the provided char is a token. |
static boolean |
isTokenString(java.lang.String s)
Returns true if all chars in string s are tokens. |
static boolean |
isWhiteSpace(char c)
Returns true if the provided char is a white space. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TOKEN
public static final int QUOTED_STRING
public static final int COMMENT
public static final int SEPARATOR
public static final int CONTROL
public static final char[] WHITE_SPACE
public static final char[] SEPARATORS
public static final int[] TYPE_TABLE
public static final boolean[] IS_WHITE_SPACE
public static final boolean[] IS_TOKEN
Constructor Detail |
---|
public GrammarUtil()
Method Detail |
---|
public static boolean isWhiteSpace(char c)
c
- char to check
public static boolean isToken(char c)
c
- char to check
public static boolean isTokenString(java.lang.String s)
s
- string to check for tokens
public static boolean containsWhiteSpace(java.lang.String s)
s
- string to check for white spaces
public static java.lang.String filterToken(java.lang.String s, int start, int end)
public static java.lang.String filterToken(java.lang.String s, int start, int end, boolean preserveBackslash)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |