public class CommandLineUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SEPARATOR
The command line argument separator.
|
Constructor and Description |
---|
CommandLineUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
concatenate(java.util.ArrayList<java.lang.String> args)
Returns the list of arguments as space separated string for the command
line.
|
static java.lang.String |
concatenate(java.lang.String[] args)
Returns the list of arguments as space separated string for the command
line.
|
static java.lang.String |
getCommandLineArgument(java.util.ArrayList<java.io.File> files)
Returns the list of file as argument for the command line.
|
static java.lang.String |
getCommandLineArgument(java.io.File file)
Returns the file as argument for the command line.
|
static java.util.ArrayList<java.io.File> |
getFiles(java.lang.String optionInput,
java.util.ArrayList<java.lang.String> fileExtentions)
Returns a list of files as imported from the command line option.
|
static java.lang.String |
getQuoteType()
Returns the quote type to use.
|
static java.util.ArrayList<java.lang.String> |
splitInput(java.lang.String cliInput)
Returns a list of file names for inputs of comma separated files.
|
public static final java.lang.String SEPARATOR
public static java.lang.String getCommandLineArgument(java.util.ArrayList<java.io.File> files)
files
- the filespublic static java.lang.String concatenate(java.util.ArrayList<java.lang.String> args)
args
- the argumentspublic static java.lang.String concatenate(java.lang.String[] args)
args
- the argumentspublic static java.lang.String getQuoteType()
public static java.lang.String getCommandLineArgument(java.io.File file)
file
- the filepublic static java.util.ArrayList<java.lang.String> splitInput(java.lang.String cliInput)
cliInput
- the CLI inputpublic static java.util.ArrayList<java.io.File> getFiles(java.lang.String optionInput, java.util.ArrayList<java.lang.String> fileExtentions) throws java.io.FileNotFoundException
optionInput
- the command line optionfileExtentions
- the file extensions to be consideredjava.io.FileNotFoundException
- exception thrown whenever a file is not
foundCopyright © 2013. All Rights Reserved.