public final class BinaryUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
validateBinary(String binary,
String name)
Does what
validateBinary(java.lang.String, java.lang.String, java.lang.String)
while using the environment variable PATH for path. |
static void |
validateBinary(String binary,
String name,
String path)
Checks a binary to be either a specification of a valid binary or a
binary name which can be found in the specified path.
|
public static void validateBinary(String binary, String name) throws BinaryValidationException
validateBinary(java.lang.String, java.lang.String, java.lang.String)
while using the environment variable PATH for path.binary - the binary to validatename - the name of the binary (used to provide comprehensive error
messages)BinaryValidationException - if the validation failedpublic static void validateBinary(String binary, String name, String path) throws BinaryValidationException
path which is split with File.pathSeparator.binary - the binary specification (path or name)name - the name of the binary (used to provide comprehensive error
messages)path - the search path in the OS format (pathes separated with the
OS' path separator)BinaryValidationException - if the binary can't be found or is
invalidCopyright © 2020. All rights reserved.