public class QuotedStringTokenizer extends StringTokenizer
StringTokenizer| 构造器和说明 |
|---|
QuotedStringTokenizer(String str) |
QuotedStringTokenizer(String str,
String delim) |
QuotedStringTokenizer(String str,
String delim,
boolean returnDelimiters) |
QuotedStringTokenizer(String str,
String delim,
boolean returnDelimiters,
boolean returnQuotes) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在类中 StringTokenizerpublic String nextToken() throws NoSuchElementException
nextToken 在类中 StringTokenizerNoSuchElementExceptionpublic String nextToken(String delim) throws NoSuchElementException
nextToken 在类中 StringTokenizerNoSuchElementExceptionpublic boolean hasMoreElements()
hasMoreElements 在接口中 Enumeration<Object>hasMoreElements 在类中 StringTokenizerpublic Object nextElement() throws NoSuchElementException
nextElement 在接口中 Enumeration<Object>nextElement 在类中 StringTokenizerNoSuchElementExceptionpublic int countTokens()
countTokens 在类中 StringTokenizerpublic 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.lenient - true if unquoting should be lenient to escaped content,
leaving some alone, false if string unescapingpublic 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 © 2016. All rights reserved.