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 |
|---|---|
static byte |
convertHexDigit(byte b) |
int |
countTokens()
Not implemented.
|
boolean |
getDouble() |
boolean |
getSingle() |
boolean |
hasMoreElements() |
boolean |
hasMoreTokens() |
Object |
nextElement() |
String |
nextToken() |
String |
nextToken(String delim) |
static String |
quote(String s)
Quote a string.
|
static void |
quote(StringBuffer buf,
String s)
Quote a string into a StringBuffer.
|
static String |
quote(String s,
String delim)
Quote a string.
|
void |
setDouble(boolean d) |
void |
setSingle(boolean single) |
String[] |
toArray() |
static String[] |
tokenize(String str) |
static String[] |
tokenize(String str,
String delimiters) |
static String |
unquote(String s)
Unquote a string.
|
public QuotedStringTokenizer(String str, String delim, boolean returnDelimiters, boolean returnQuotes)
str - String to tokenize.delim - List of delimiter characters as string. Can be null, to default to ' \t\n\r'returnDelimiters - If true, nextToken() will include the delimiters, not just tokenized
tokens.returnQuotes - If true, nextToken() will include the quotation characters when they are present.public QuotedStringTokenizer(String str, String delim, boolean returnDelimiters)
public QuotedStringTokenizer(String str)
public String[] toArray()
public boolean hasMoreTokens()
hasMoreTokens in class StringTokenizerpublic String nextToken() throws NoSuchElementException
nextToken in class StringTokenizerNoSuchElementExceptionpublic String nextToken(String delim) throws NoSuchElementException
nextToken in class StringTokenizerNoSuchElementExceptionpublic boolean hasMoreElements()
hasMoreElements in interface Enumeration<Object>hasMoreElements in class StringTokenizerpublic Object nextElement() throws NoSuchElementException
nextElement in interface Enumeration<Object>nextElement in class StringTokenizerNoSuchElementExceptionpublic int countTokens()
countTokens in class StringTokenizerpublic static String quote(String s, String delim)
s - The string to quote.public static String quote(String s)
s - The string to quote.public static void quote(StringBuffer buf, String s)
buf - The StringBuffers - The String to quote.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 truepublic static byte convertHexDigit(byte b)
b - An ASCII encoded character 0-9 a-f A-FCopyright © 2017. All rights reserved.