Class ExecParseUtils
java.lang.Object
org.apache.camel.component.exec.impl.ExecParseUtils
Utility class for parsing, used by the Camel Exec component.
Note: the class should be dropped, when the commons-exec library implements similar functionality.
Note: the class should be dropped, when the commons-exec library implements similar functionality.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleanisDoubleQuoted(String input) Tests if the input is enclosed within a double-QUOTE_CHARstringprotected static booleanisSingleQuoted(String input) Tests if the input is enclosed withinQUOTE_CHARcharacterssplitCommaSeparatedToListOfInts(String commaSeparatedInts) Splits the input line string byWHITESPACE.
-
Field Details
-
WHITESPACE
- See Also:
-
QUOTE_CHAR
- See Also:
-
-
Method Details
-
splitToWhiteSpaceSeparatedTokens
Splits the input line string byWHITESPACE. Supports quoting the white-spaces with aQUOTE_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.
E.g. The string"arg 1" arg2will return the tokensarg 1,arg2
The string""arg 1"" "arg2" arg 3will return the tokens"arg 1",arg2,argand3- Parameters:
input- the input to split.- Returns:
- a not-null list of tokens
-
isSingleQuoted
Tests if the input is enclosed withinQUOTE_CHARcharacters- Parameters:
input- a not null String- Returns:
- true if the regular expression is matched
-
isDoubleQuoted
Tests if the input is enclosed within a double-QUOTE_CHARstring- Parameters:
input- a not null String- Returns:
- true if the regular expression is matched
-
splitCommaSeparatedToListOfInts
-