Class Tokenizer
java.lang.Object
org.glassfish.jersey.internal.util.Tokenizer
A utility class providing methods capable of splitting String entries
into an array of tokens based on either default or custom token delimiters.
- Author:
- Marek Potociar
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Common Jersey delimiters used by various properties. -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
Get a canonical array of tokens from a String entry that may contain zero or more tokens separated by common delimiters" ,;\n"
.static String[]
Get a canonical array of tokens from an array of String entries where each entry may contain zero or more tokens separated by common delimiters" ,;\n"
.static String[]
Get a canonical array of tokens from an array of String entries where each entry may contain zero or more tokens separated by characters in delimiters string.static String[]
Get a canonical array of tokens from a String entry that may contain zero or more tokens separated by characters in delimiters string.
-
Field Details
-
COMMON_DELIMITERS
Common Jersey delimiters used by various properties.- See Also:
-
-
Method Details
-
tokenize
Get a canonical array of tokens from an array of String entries where each entry may contain zero or more tokens separated by common delimiters" ,;\n"
.- Parameters:
entries
- an array where each String entry may contain zero or morecommon delimiters
separated tokens.- Returns:
- the array of tokens, each token is trimmed, the array will
not contain any empty or
null
entries.
-
tokenize
Get a canonical array of tokens from an array of String entries where each entry may contain zero or more tokens separated by characters in delimiters string.- Parameters:
entries
- an array where each String entry may contain zero or more delimiters separated tokens.delimiters
- string with delimiters, every character represents one delimiter.- Returns:
- the array of tokens, each token is trimmed, the array will
not contain any empty or
null
entries.
-
tokenize
Get a canonical array of tokens from a String entry that may contain zero or more tokens separated by common delimiters" ,;\n"
.- Parameters:
entry
- a String that may contain zero or morecommon delimiters
separated tokens.- Returns:
- the array of tokens, each tokens is trimmed, the array will
not contain any empty or
null
entries.
-
tokenize
Get a canonical array of tokens from a String entry that may contain zero or more tokens separated by characters in delimiters string.- Parameters:
entry
- a String that may contain zero or more delimiters separated tokens.delimiters
- string with delimiters, every character represents one delimiter.- Returns:
- the array of tokens, each tokens is trimmed, the array will
not contain any empty or
null
entries.
-