Package org.eclipse.jetty.util
Class QuotedStringTokenizer
java.lang.Object
java.util.StringTokenizer
org.eclipse.jetty.util.QuotedStringTokenizer
- All Implemented Interfaces:
Enumeration<Object>
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
StringTokenizer with Quoting support.
This class is a copy of the java.util.StringTokenizer API and
the behaviour is the same, except that single and double quoted
string values are recognised.
Delimiters within quotes are not considered delimiters.
Quotes can be escaped with '\'.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.QuotedStringTokenizer(String str, String delim) Deprecated.QuotedStringTokenizer(String str, String delim, boolean returnDelimiters) Deprecated.QuotedStringTokenizer(String str, String delim, boolean returnDelimiters, boolean returnQuotes) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionintDeprecated.Not implemented.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.static booleanDeprecated.Deprecated.Deprecated.Deprecated.static voidquote(Appendable buffer, String input) Deprecated.Quote a string into an Appendable.static StringDeprecated.Quote a string.static StringquoteIfNeeded(String s, String delim) Deprecated.Quote a string.static voidquoteOnly(Appendable buffer, String input) Deprecated.Quote a string into an Appendable.voidsetDouble(boolean d) Deprecated.voidsetSingle(boolean single) Deprecated.static StringDeprecated.static StringDeprecated.Unquote a string.static StringDeprecated.static StringunquoteOnly(String s, boolean lenient) Deprecated.Unquote a string, NOT converting unicode sequencesMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
Method Details
-
hasMoreTokens
public boolean hasMoreTokens()Deprecated.- Overrides:
hasMoreTokensin classStringTokenizer
-
nextToken
Deprecated.- Overrides:
nextTokenin classStringTokenizer- Throws:
NoSuchElementException
-
nextToken
Deprecated.- Overrides:
nextTokenin classStringTokenizer- Throws:
NoSuchElementException
-
hasMoreElements
public boolean hasMoreElements()Deprecated.- Specified by:
hasMoreElementsin interfaceEnumeration<Object>- Overrides:
hasMoreElementsin classStringTokenizer
-
nextElement
Deprecated.- Specified by:
nextElementin interfaceEnumeration<Object>- Overrides:
nextElementin classStringTokenizer- Throws:
NoSuchElementException
-
countTokens
public int countTokens()Deprecated.Not implemented.- Overrides:
countTokensin classStringTokenizer
-
quoteIfNeeded
Deprecated.Quote a string. The string is quoted only if quoting is required due to embedded delimiters, quote characters or the empty string.- Parameters:
s- The string to quote.delim- the delimiter to use to quote the string- Returns:
- quoted string
-
quote
Deprecated.Quote a string. The string is quoted only if quoting is required due to embedded delimiters, quote characters or the empty string.- Parameters:
s- The string to quote.- Returns:
- quoted string
-
quoteOnly
Deprecated.Quote a string into an Appendable. Only quotes and backslash are escaped.- Parameters:
buffer- The Appendableinput- The String to quote.
-
quote
Deprecated.Quote a string into an Appendable. The characters ", \, \n, \r, \t, \f and \b are escaped- Parameters:
buffer- The Appendableinput- The String to quote.
-
unquoteOnly
Deprecated. -
unquoteOnly
Deprecated.Unquote a string, NOT converting unicode sequences- Parameters:
s- The string to unquote.lenient- if true, will leave in backslashes that aren't valid escapes- Returns:
- quoted string
-
unquote
Deprecated. -
unquote
Deprecated.Unquote a string.- Parameters:
s- The string to unquote.lenient- true if unquoting should be lenient to escaped content, leaving some alone, false if string unescaping- Returns:
- quoted string
-
isQuoted
Deprecated. -
getDouble
public boolean getDouble()Deprecated.- Returns:
- handle double quotes if true
-
setDouble
public void setDouble(boolean d) Deprecated.- Parameters:
d- handle double quotes if true
-
getSingle
public boolean getSingle()Deprecated.- Returns:
- handle single quotes if true
-
setSingle
public void setSingle(boolean single) Deprecated.- Parameters:
single- handle single quotes if true
-