public class Binaries
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.Boolean |
binariesExtracted
for storing any previously extract binary.
|
static java.lang.String |
LIBRARIES |
protected static java.util.logging.Logger |
LOGGER
for logging.
|
static java.lang.String |
RESOURCE_DIR
the resource prefix.
|
protected static java.lang.String |
rsyncBinary
the rsync binary.
|
protected static java.lang.String |
sshBinary
the ssh binary.
|
protected static java.lang.String |
sshkeygenBinary
the ssh-keygen binary.
|
static java.lang.String |
WINDOWS_DIR_32
the sub-directory for the windows 32bit binaries.
|
static java.lang.String |
WINDOWS_DIR_64
the sub-directory for the windows 64bit binaries.
|
static java.lang.String |
WINDOWS_HOME_DIR
the windows environment variable for the rsyncj4 home directory.
|
| Constructor and Description |
|---|
Binaries() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
convertPath(java.lang.String path)
Converts the path into cygwin notation on Windows platform.
|
protected static java.lang.String |
copyResourceTo(java.lang.String inDir,
java.lang.String name,
java.lang.String outDir)
Copies the specified resource to the output directory.
|
protected static void |
extractBinaries()
Extracts the binaries to the tmp directory.
|
static int |
getBitness()
Returns the "bitness", ie 32 or 64 bit of the underlying OS.
|
protected static java.util.List<java.lang.String> |
getLibraries()
Returns the list of libraries to copy.
|
protected static java.lang.String |
getWindowsDir()
Returns the sub-directory for the Windows binaries, depending on the
bitness.
|
protected static java.lang.String |
homeDir()
Returns the home directory to use for rsync4j.
|
static java.lang.String |
rsyncBinary()
Returns the rsync binary (if necessary extracts the binaries to the temp directory).
|
static java.lang.String |
sshBinary()
Returns the ssh binary (if necessary extracts the binaries to the temp directory).
|
static java.lang.String |
sshkeygenBinary()
Returns the ssh-keygen binary (if necessary extracts the binaries to the temp directory).
|
public static final java.lang.String RESOURCE_DIR
public static final java.lang.String WINDOWS_DIR_32
public static final java.lang.String WINDOWS_DIR_64
public static final java.lang.String WINDOWS_HOME_DIR
public static final java.lang.String LIBRARIES
protected static java.lang.Boolean binariesExtracted
protected static java.lang.String rsyncBinary
protected static java.lang.String sshBinary
protected static java.lang.String sshkeygenBinary
protected static java.util.logging.Logger LOGGER
public static int getBitness()
protected static java.lang.String copyResourceTo(java.lang.String inDir,
java.lang.String name,
java.lang.String outDir)
throws java.lang.Exception
inDir - the resource directory to usename - the name of the resourceoutDir - the output directoryjava.lang.Exceptionprotected static java.lang.String homeDir()
WINDOWS_HOME_DIR environment variable
to point it to a custom location.protected static java.lang.String getWindowsDir()
protected static java.util.List<java.lang.String> getLibraries()
throws java.lang.Exception
java.lang.Exception - if readingprotected static void extractBinaries()
throws java.lang.Exception
java.lang.Exception - if extraction failspublic static java.lang.String rsyncBinary()
throws java.lang.Exception
java.lang.Exception - if extraction failspublic static java.lang.String sshBinary()
throws java.lang.Exception
java.lang.Exception - if extraction failspublic static java.lang.String sshkeygenBinary()
throws java.lang.Exception
java.lang.Exception - if extraction failspublic static java.lang.String convertPath(java.lang.String path)
path - the path to convertCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.