|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.StringTokenizer org.eclipse.jetty.util.QuotedStringTokenizer
public class QuotedStringTokenizer
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 doulbe quoted string values are recognized. Delimiters within quotes are not considered delimiters. Quotes can be escaped with '\'.
StringTokenizer
Constructor Summary | |
---|---|
QuotedStringTokenizer(String str)
|
|
QuotedStringTokenizer(String str,
String delim)
|
|
QuotedStringTokenizer(String str,
String delim,
boolean returnDelimiters)
|
|
QuotedStringTokenizer(String str,
String delim,
boolean returnDelimiters,
boolean returnQuotes)
|
Method Summary | |
---|---|
int |
countTokens()
Not implemented. |
boolean |
getDouble()
|
boolean |
getSingle()
|
boolean |
hasMoreElements()
|
boolean |
hasMoreTokens()
|
Object |
nextElement()
|
String |
nextToken()
|
String |
nextToken(String delim)
|
static void |
quote(Appendable buf,
String s)
Quote a string into an Appendable. |
static String |
quote(String s)
Quote a string. |
static boolean |
quoteIfNeeded(Appendable buf,
String s,
String delim)
Quote a string into a StringBuffer only if needed. |
static String |
quoteIfNeeded(String s,
String delim)
Quote a string. |
void |
setDouble(boolean d)
|
void |
setSingle(boolean single)
|
static String |
unquote(String s)
Unquote a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuotedStringTokenizer(String str, String delim, boolean returnDelimiters, boolean returnQuotes)
public QuotedStringTokenizer(String str, String delim, boolean returnDelimiters)
public QuotedStringTokenizer(String str, String delim)
public QuotedStringTokenizer(String str)
Method Detail |
---|
public boolean hasMoreTokens()
hasMoreTokens
in class StringTokenizer
public String nextToken() throws NoSuchElementException
nextToken
in class StringTokenizer
NoSuchElementException
public String nextToken(String delim) throws NoSuchElementException
nextToken
in class StringTokenizer
NoSuchElementException
public boolean hasMoreElements()
hasMoreElements
in interface Enumeration<Object>
hasMoreElements
in class StringTokenizer
public Object nextElement() throws NoSuchElementException
nextElement
in interface Enumeration<Object>
nextElement
in class StringTokenizer
NoSuchElementException
public int countTokens()
countTokens
in class StringTokenizer
public static String quoteIfNeeded(String s, String delim)
s
- The string to quote.
public static String quote(String s)
s
- The string to quote.
public static void quote(Appendable buf, String s)
buf
- The Appendables
- The String to quote.public static boolean quoteIfNeeded(Appendable buf, String s, String delim)
buf
- The StringBuffers
- The String to quote.delim
- String of characters that must be quoted.
public static String unquote(String s)
s
- The string to unquote.
public boolean getDouble()
public void setDouble(boolean d)
d
- handle double quotes if truepublic boolean getSingle()
public void setSingle(boolean single)
single
- handle single quotes if true
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |