Package org.wso2.carbon.utils
Class Tokenizer
java.lang.Object
org.wso2.carbon.utils.Tokenizer
Simple tokenizer class. Used to parse data.
This class is taken from org.eclipse.osgi.framework.internal.core
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchargetChar()Returns the next character to be processed by the tokenizer.Returns the next token delimited by any character in the provided terminals String.Returns the next token delimited by any character in the provided terminals String.Returns the next token delimited by any character in the provided terminals String.
-
Constructor Details
-
Tokenizer
Construct the tokenizer from the given string.- Parameters:
value- String
-
-
Method Details
-
getToken
Returns the next token delimited by any character in the provided terminals String.- Parameters:
terminals- String- Returns:
- String
-
getString
Returns the next token delimited by any character in the provided terminals String. If the text content being considered is within quotes, then return the entire string within quotes. If the text content within contains escape characters, preserve it if it is provided as the second parameter.- Parameters:
terminals- StringpreserveEscapes- String- Returns:
- String
-
getString
Returns the next token delimited by any character in the provided terminals String. If the text content being considered is within quotes, then return the entire string within quotes. If the text content within contains escape characters, those are ignored.- Parameters:
terminals- String- Returns:
- String
-
getChar
public char getChar()Returns the next character to be processed by the tokenizer.- Returns:
- char
-