public class Main
extends java.lang.Object
| Constructor and Description |
|---|
Main() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
ExportResource(java.lang.String resourceName)
Export a resource embedded into a Jar file to the local file path.
|
protected static java.lang.String |
getFilenameFromUser(java.lang.String prompt,
java.lang.String defaultFilename,
java.lang.String expectedExtension,
boolean ensureFileExists,
boolean ensureFileNotExists)
Prompts the user for a input or output filename
|
protected static java.lang.String |
getStringFromUser(java.lang.String prompt,
java.lang.String defaultValue,
java.lang.String pattern)
Asks the user (repeatedly, if neccessary) on the command line for a String
(offering a defaultValue) conforming to a Regex pattern
|
static void |
main(java.lang.String[] args)
the main function of the commandline tool...
|
static void |
printLicense() |
protected static java.lang.String getStringFromUser(java.lang.String prompt,
java.lang.String defaultValue,
java.lang.String pattern)
throws java.lang.Exception
prompt - the question to be asked to the userdefaultValue - the default return value if user hits enterpattern - a regex of acceptable valuesjava.lang.Exception - if pattern not compielable or IOexception on inputprotected static java.lang.String getFilenameFromUser(java.lang.String prompt,
java.lang.String defaultFilename,
java.lang.String expectedExtension,
boolean ensureFileExists,
boolean ensureFileNotExists)
prompt - the text the user is askeddefaultFilename - a default Filename. Passing an empty string indicates that specifying a file is optionalexpectedExtension - will warn if filename does not match expected file extension, "or" possible with e.g. pdf|xmlensureFileExists - will warn if file does NOT exist (for input files)ensureFileNotExists - will warn if file DOES exist (for output files)public static void printLicense()
public static void main(java.lang.String[] args)
args - the commandline args, see also https://www.mustangproject.org/commandline/#verbosepublic static java.lang.String ExportResource(java.lang.String resourceName)
throws java.lang.Exception
resourceName - ie.: "/SmartLibrary.dll"java.lang.Exception - e.g. if the specified resource does not exist at the specified locationCopyright © 2024. All rights reserved.