This class is only partly documented because I didn't write it and have only an inkling about how it works. It was released into the public domain by the author in a forum post, but without much documentation.
Also, it uses Hungarian variable naming, which makes me want to stick a pickaxe through my head.
Static Public Member Functions | |
static void | exec (String sCommand) |
Executes the command passed. | |
Static Private Member Functions | |
static String | getCompletePath (String sCommand) |
Gives the full path to execute. | |
static boolean | isPossibleFile (String sFile) |
Checks whether the url starts with c: or similar. | |
static boolean | isPossibleServerShare (String sCmd) |
Checks whether the url starts with server share like //server/dir*. | |
static boolean | isPossibleURL (String sUrl) |
Checks whether the url starts with www. | |
Static Private Attributes | |
static Pattern | pUrlPattern |
static Pattern | pServerSharePatern = Pattern.compile("^[\\\\//]") |
static Pattern | pFilePattern = Pattern.compile("^[A-Za-z\\\\//][:]") |
static void edu.cmu.hcii.calo.util.CommandLauncher.exec | ( | String | sCommand | ) | [static] |
Executes the command passed.
Will launch applications, documents, and Web sites, among other things.
sCommand | the command to execute |
static String edu.cmu.hcii.calo.util.CommandLauncher.getCompletePath | ( | String | sCommand | ) | [static, private] |
Gives the full path to execute.
static boolean edu.cmu.hcii.calo.util.CommandLauncher.isPossibleFile | ( | String | sFile | ) | [static, private] |
Checks whether the url starts with c: or similar.
static boolean edu.cmu.hcii.calo.util.CommandLauncher.isPossibleServerShare | ( | String | sCmd | ) | [static, private] |
Checks whether the url starts with server share like //server/dir*.
static boolean edu.cmu.hcii.calo.util.CommandLauncher.isPossibleURL | ( | String | sUrl | ) | [static, private] |
Checks whether the url starts with www.
or mailto: or http: or ....
sUrl | the url to check |
Pattern edu.cmu.hcii.calo.util.CommandLauncher.pUrlPattern [static, private] |
Initial value:
Pattern.compile("^www\\.|^http:|^mailto:|^file:|^WWW\\.|^HTTP:|^MAILTO:|^FILE:")