public class QuotedStringTokenizer extends StringTokenizer
StringTokenizer
Constructor and Description |
---|
QuotedStringTokenizer(String str) |
QuotedStringTokenizer(String str,
String delim) |
QuotedStringTokenizer(String str,
String delim,
boolean returnDelimiters) |
QuotedStringTokenizer(String str,
String delim,
boolean returnDelimiters,
boolean returnQuotes) |
Modifier and Type | Method and Description |
---|---|
int |
countTokens()
Not implemented.
|
boolean |
getDouble() |
boolean |
getSingle() |
boolean |
hasMoreElements() |
boolean |
hasMoreTokens() |
static boolean |
isQuoted(String s) |
Object |
nextElement() |
String |
nextToken() |
String |
nextToken(String delim) |
static void |
quote(Appendable buffer,
String input)
Quote a string into an Appendable.
|
static String |
quote(String s)
Quote a string.
|
static String |
quoteIfNeeded(String s,
String delim)
Quote a string.
|
static void |
quoteOnly(Appendable buffer,
String input)
Quote a string into an Appendable.
|
void |
setDouble(boolean d) |
void |
setSingle(boolean single) |
static String |
unquote(String s) |
static String |
unquote(String s,
boolean lenient)
Unquote a string.
|
static String |
unquoteOnly(String s) |
static String |
unquoteOnly(String s,
boolean lenient)
Unquote a string, NOT converting unicode sequences
|
public QuotedStringTokenizer(String str, String delim, boolean returnDelimiters, boolean returnQuotes)
public QuotedStringTokenizer(String str, String delim, boolean returnDelimiters)
public QuotedStringTokenizer(String str)
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.delim
- the delimiter to use to quote the stringpublic static String quote(String s)
s
- The string to quote.public static void quoteOnly(Appendable buffer, String input)
buffer
- The Appendableinput
- The String to quote.public static void quote(Appendable buffer, String input)
buffer
- The Appendableinput
- The String to quote.public static String unquoteOnly(String s, boolean lenient)
s
- The string to unquote.lenient
- if true, will leave in backslashes that aren't valid escapespublic static String unquote(String s, boolean lenient)
s
- The string to unquote.public static boolean isQuoted(String s)
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 trueCopyright © 1995-2015 Webtide. All Rights Reserved.