Package org.alfresco.util.exec
Class ExecParameterTokenizer
java.lang.Object
org.alfresco.util.exec.ExecParameterTokenizer
This class is used to tokenize strings used as parameters for
RuntimeExec
objects.
Examples of such strings are as follows (ImageMagick-like parameters):
- -font Helvetica -pointsize 50
- -font Helvetica -pointsize 50 -draw "circle 100,100 150,150"
- -font Helvetica -pointsize 50 -draw "gravity south fill black text 0,12 'CopyRight'"
- Since:
- 3.4.2
- Author:
- Neil Mc Erlean
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
A substring that is surrounded by (single or double) quotes.static interface
Utility interface for a substring in a parameter string.class
A substring that is not surrounded by (single or double) quotes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the tokens in a parameter string.
-
Constructor Details
-
ExecParameterTokenizer
-
-
Method Details
-
getAllTokens
This method returns the tokens in a parameter string. Any tokens not contained within single or double quotes will be tokenized in the normal way i.e. by using whitespace separators and the standard StringTokenizer algorithm. Any tokens which are contained within single or double quotes will be returned as single String instances and will have their quote marks removed. See above for examples.- Throws:
NullPointerException
- if the string to be tokenized was null.
-