|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.StringTokenizer | +--org.mortbay.util.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(java.lang.String str)
|
|
QuotedStringTokenizer(java.lang.String str,
java.lang.String delim)
|
|
QuotedStringTokenizer(java.lang.String str,
java.lang.String delim,
boolean returnTokens)
|
|
QuotedStringTokenizer(java.lang.String str,
java.lang.String delim,
boolean returnTokens,
boolean returnQuotes)
|
Method Summary | |
int |
countTokens()
Not implemented. |
boolean |
hasMoreElements()
|
boolean |
hasMoreTokens()
|
java.lang.Object |
nextElement()
|
java.lang.String |
nextToken()
|
java.lang.String |
nextToken(java.lang.String delim)
|
static void |
quote(java.lang.StringBuffer buf,
java.lang.String s)
Quote a string into a StringBuffer. |
static java.lang.String |
quote(java.lang.String s,
java.lang.String delim)
Quote a string. |
static java.lang.String |
unquote(java.lang.String s)
Unquote a string. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QuotedStringTokenizer(java.lang.String str, java.lang.String delim, boolean returnTokens, boolean returnQuotes)
public QuotedStringTokenizer(java.lang.String str, java.lang.String delim, boolean returnTokens)
public QuotedStringTokenizer(java.lang.String str, java.lang.String delim)
public QuotedStringTokenizer(java.lang.String str)
Method Detail |
public boolean hasMoreTokens()
hasMoreTokens
in class java.util.StringTokenizer
public java.lang.String nextToken() throws java.util.NoSuchElementException
nextToken
in class java.util.StringTokenizer
java.util.NoSuchElementException
public java.lang.String nextToken(java.lang.String delim) throws java.util.NoSuchElementException
nextToken
in class java.util.StringTokenizer
java.util.NoSuchElementException
public boolean hasMoreElements()
hasMoreElements
in interface java.util.Enumeration
hasMoreElements
in class java.util.StringTokenizer
public java.lang.Object nextElement() throws java.util.NoSuchElementException
nextElement
in interface java.util.Enumeration
nextElement
in class java.util.StringTokenizer
java.util.NoSuchElementException
public int countTokens()
countTokens
in class java.util.StringTokenizer
public static java.lang.String quote(java.lang.String s, java.lang.String delim)
s
- The string to quote.
public static void quote(java.lang.StringBuffer buf, java.lang.String s)
buf
- The StringBuffers
- The String to quote.public static java.lang.String unquote(java.lang.String s)
s
- The string to unquote.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |