| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final boolean | |
| private final boolean | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | LegacyQuotedStringTokenizer(String delim, boolean returnDelimiters, boolean returnQuotes, boolean singleQuotes)
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | needsQuoting(char
A character c)Implements org. |
| public void | quote(Appendable
The Appendable to append the quoted and escaped string into. buffer, String The String to quote. input)Implements org. |
| public String | quoteIfNeeded(String
The string to quote. s)Implements org. |
| public void | quoteIfNeeded(StringBuilder
the buffer to append to buf, String the string to possibly quote str)Implements org. |
| public Iterator | tokenize(String
The string to be tokenized string)Implements org. Iterator of tokens
split from the string by delimiters.
|
| public String | unquote(String
The string to unquote. s)Implements org. |
| _delim | back to summary |
|---|---|
| private final String _delim | |
| _returnDelimiters | back to summary |
|---|---|
| private final boolean _returnDelimiters | |
| _returnQuotes | back to summary |
|---|---|
| private final boolean _returnQuotes | |
| _singleQuotes | back to summary |
|---|---|
| private final boolean _singleQuotes | |
| LegacyQuotedStringTokenizer | back to summary |
|---|---|
| pack-priv LegacyQuotedStringTokenizer(String delim, boolean returnDelimiters, boolean returnQuotes, boolean singleQuotes) | |
| needsQuoting | back to summary |
|---|---|
| public boolean needsQuoting(char c) Implements org.
| |
| quote | back to summary |
|---|---|
| public void quote(Appendable buffer, String input) Implements org. Doc from org. Quote a string into an Appendable, escaping any characters that need to be escaped.
| |
| quoteIfNeeded | back to summary |
|---|---|
| public String quoteIfNeeded(String s) Implements org. Doc from org. Quote a string. The string is quoted only if quoting is required due to embedded delimiters, quote characters or the empty string. | |
| quoteIfNeeded | back to summary |
|---|---|
| public void quoteIfNeeded(StringBuilder buf, String str) Implements org. Doc from org. Append into buf the provided string, adding quotes if needed.
Quoting is determined if any of the characters in the
| |
| tokenize | back to summary |
|---|---|
| public Iterator Implements org. Doc from org. Tokenize the passed string into an | |
| unquote | back to summary |
|---|---|
| public String unquote(String s) Implements org. Doc from org. Unquote a string and expand any escaped characters | |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private int | |
| private final String | |
| private final StringBuffer | |
| private static final char[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public boolean | hasMoreTokens()
Overrides java. |
| private static boolean | isValidEscaping(char c)
Check that char c (which is preceded by a backslash) is a valid escape sequence. |
| public static boolean | |
| public String | nextToken()
Overrides java. |
| public String | nextToken(String
the new delimiters. delim)Overrides java. |
| public static String | |
| public static void | quote(Appendable
The Appendable buffer, String The String to quote. input)Quote a string into an Appendable. |
| public static String | Returns: quoted stringThe string to quote. s, String the delimiter to use to quote the string delim)Quote a string. |
| public static void | quoteIfNeeded(StringBuilder
the buffer to append to buf, String the string to possibly quote str, String the delimiter characters that will trigger automatic quoting delim)Append into buf the provided string, adding quotes if needed. |
| public static String | |
| public static String |
| _hasToken | back to summary |
|---|---|
| private boolean _hasToken | |
| _i | back to summary |
|---|---|
| private int _i | |
| _string | back to summary |
|---|---|
| private final String _string | |
| _token | back to summary |
|---|---|
| private final StringBuffer _token | |
| escapes | back to summary |
|---|---|
| private static final char[] escapes | |
| LegacyTokenizer | back to summary |
|---|---|
| public LegacyTokenizer(String str) | |
| countTokens | back to summary |
|---|---|
| public int countTokens() Overrides java. Not implemented.
| |
| hasMoreTokens | back to summary |
|---|---|
| public boolean hasMoreTokens() Overrides java. Doc from java. Tests if there are more tokens available from this tokenizer's string.
If this method returns
| |
| isValidEscaping | back to summary |
|---|---|
| private static boolean isValidEscaping(char c) Check that char c (which is preceded by a backslash) is a valid escape sequence. | |
| needsQuoting | back to summary |
|---|---|
| public static boolean needsQuoting(char c, String delim) | |
| nextToken | back to summary |
|---|---|
| public String nextToken() throws NoSuchElementException Overrides java. Doc from java. Returns the next token from this string tokenizer.
| |
| nextToken | back to summary |
|---|---|
| public String nextToken(String delim) throws NoSuchElementException Overrides java. Doc from java. Returns the next token in this string tokenizer's string. First,
the set of characters considered to be delimiters by this
| |
| quote | back to summary |
|---|---|
| public static String quote(String s) Quote a string. The string is quoted only if quoting is required due to embedded delimiters, quote characters or the empty string. | |
| quote | back to summary |
|---|---|
| public static void quote(Appendable buffer, String input) Quote a string into an Appendable. The characters ", \, \n, \r, \t, \f and \b are escaped
| |
| quoteIfNeeded | back to summary |
|---|---|
| public static String quoteIfNeeded(String s, String delim) Quote a string. The string is quoted only if quoting is required due to embedded delimiters, quote characters or the empty string. | |
| quoteIfNeeded | back to summary |
|---|---|
| public static void quoteIfNeeded(StringBuilder buf, String str, String delim) Append into buf the provided string, adding quotes if needed.
Quoting is determined if any of the characters in the
| |
| unquote | back to summary |
|---|---|
| public static String unquote(String s) | |
| unquote | back to summary |
|---|---|
| public static String unquote(String s, boolean lenient) Unquote a string. | |