|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.component.exec.impl.ExecParseUtils
public final class ExecParseUtils
Utility class for parsing, used by the Camel Exec component.
Note: the class should be dropped, when the the commons-exec library
implements similar functionality.
Field Summary | |
---|---|
static String |
QUOTE_CHAR
|
static String |
WHITESPACE
|
Method Summary | |
---|---|
protected static boolean |
isDoubleQuoted(String input)
Tests if the input is enclosed within a double- QUOTE_CHAR string |
protected static boolean |
isSingleQuoted(String input)
Tests if the input is enclosed within QUOTE_CHAR characters |
static List<String> |
splitToWhiteSpaceSeparatedTokens(String input)
Splits the input line string by WHITESPACE . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String WHITESPACE
public static final String QUOTE_CHAR
Method Detail |
---|
public static List<String> splitToWhiteSpaceSeparatedTokens(String input)
WHITESPACE
. Supports quoting the
white-spaces with a QUOTE_CHAR
. A quote itself can also be
enclosed within #QUOTE_CHAR
#QUOTE_CHAR
. More than two
double-quotes in a sequence is not allowed. Nested quotes are not
allowed."arg 1" arg2 will return the tokens arg 1
,
arg2
The string
""arg 1"" "arg2" arg 3 will return the tokens "arg 1"
, arg2
,arg
and 3
- Parameters:
input
- the input to split.
- Returns:
- a not-null list of tokens
protected static boolean isSingleQuoted(String input)
QUOTE_CHAR
characters
input
- a not null String
protected static boolean isDoubleQuoted(String input)
QUOTE_CHAR
string
input
- a not null String
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |