|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gridsystems.utils.SystemUtils
public final class SystemUtils
General Utilities for several modules.
Field Summary | |
---|---|
static java.lang.String |
AIX_POWERPC
AIX PowerPC. |
static java.lang.String |
HPUX_IA64
HPUX IA64. |
static java.lang.String |
HPUX_PA
HPUX PARISC. |
static java.lang.String |
LINUX_AMD64
Linux AMD64. |
static java.lang.String |
LINUX_I686
Linux i686. |
static java.lang.String |
LINUX_IA64
Linux IA64. |
static java.lang.String |
MACOSX_I386
MacOSX Intel. |
static java.lang.String |
MACOSX_POWERPC
MacOSX PowerPC. |
static java.lang.String |
SUNOS_I386
SunOS i386. |
static java.lang.String |
SUNOS_SPARC
SunOS sparc. |
static java.lang.String |
WINDOWS_IA64
Windows IA64. |
static java.lang.String |
WINDOWS_X86
Windows x86. |
Method Summary | |
---|---|
static java.lang.Integer |
execAndSaveOutput(java.lang.String[] command,
java.lang.String[] envp,
java.io.File baseDir,
java.io.File outputFile)
Executes the given command and saves its output into a file. |
static java.lang.Integer |
execAndSaveOutput(java.lang.String[] command,
java.lang.String[] envp,
java.io.File baseDir,
java.io.OutputStream output)
Executes the given command and saves its output into a file. |
static java.lang.Integer |
execAndSaveOutput(java.lang.String command,
java.lang.String[] envp,
java.io.File baseDir,
java.io.File outputFile)
Executes the given command and saves its output into a file. |
static java.lang.Integer |
execAndSaveOutput(java.lang.String command,
java.lang.String[] envp,
java.io.File baseDir,
java.io.OutputStream output)
Executes the given command and saves its output into a file. |
static java.lang.Integer |
execPiped(java.lang.String[] command,
java.lang.String[] envp,
java.io.File baseDir)
Executes the given command piping its input and output with System.out and System.in. |
static java.lang.Integer |
execPiped(java.lang.String command,
java.lang.String[] envp,
java.io.File baseDir)
Executes the given command piping its input and output with System.out and System.in. |
static java.io.File |
extractDynamicLibrary(java.lang.String dynamiclibraryname,
java.lang.Class<?> pathclass)
Deprecated. Use JNIUtils.extractDynamicLibrary method. |
static java.io.File |
extractDynamicLibrary(java.lang.String dynamiclibraryname,
java.lang.String path)
Deprecated. Use JNIUtils.extractDynamicLibrary method. |
protected static com.gridsystems.utils.SystemUtils.OsMapEntry |
getEntry(java.lang.String osName)
Gets a GridSystems platform for the specified properties. |
static java.util.Properties |
getEnvironment()
Retrieves the environment variables list from the system. |
static java.lang.String |
getOsName()
Gets the gridSystems platform name of this machine. |
static java.lang.String |
getOsName(java.lang.String osName,
java.lang.String osArch)
Gets the GridSystems platform name for a machine with the passed properties. |
static java.lang.String |
getOSVersion()
|
static java.lang.String |
getSimpleArchName()
Gets the local architecture name. |
static java.lang.String |
getSimpleOsName()
Gets the local OS name without the CPU architecture. |
static java.lang.String |
getSimpleOsName(java.lang.String osName)
Extracts the simple OS name from the specified platform id. |
static java.lang.String |
getTempDir()
|
static boolean |
isUnix()
Return true if this OS is not windows. |
static boolean |
isWindows()
Return true if this OS is windows. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String WINDOWS_X86
public static final java.lang.String WINDOWS_IA64
public static final java.lang.String SUNOS_SPARC
public static final java.lang.String SUNOS_I386
public static final java.lang.String LINUX_I686
public static final java.lang.String LINUX_IA64
public static final java.lang.String LINUX_AMD64
public static final java.lang.String HPUX_PA
public static final java.lang.String HPUX_IA64
public static final java.lang.String AIX_POWERPC
public static final java.lang.String MACOSX_POWERPC
public static final java.lang.String MACOSX_I386
Method Detail |
---|
public static boolean isWindows()
public static boolean isUnix()
public static java.lang.String getOsName()
public static java.lang.String getSimpleOsName()
public static java.lang.String getSimpleArchName()
public static java.lang.String getSimpleOsName(java.lang.String osName)
osName
- The platform id
public static java.lang.String getOsName(java.lang.String osName, java.lang.String osArch)
osName
- A value for the "os.name" system propertyosArch
- A value for the "os.arch" system property
protected static com.gridsystems.utils.SystemUtils.OsMapEntry getEntry(java.lang.String osName)
osName
- A value for the "os.name" system property
public static java.lang.String getOSVersion()
public static java.util.Properties getEnvironment()
public static java.io.File extractDynamicLibrary(java.lang.String dynamiclibraryname, java.lang.Class<?> pathclass) throws java.lang.Exception
dynamiclibraryname
- the DL namepathclass
- the path class
java.lang.Exception
- if errorpublic static java.io.File extractDynamicLibrary(java.lang.String dynamiclibraryname, java.lang.String path) throws java.lang.Exception
dynamiclibraryname
- the DL namepath
- the path
java.lang.Exception
- if errorpublic static java.lang.String getTempDir()
public static java.lang.Integer execAndSaveOutput(java.lang.String command, java.lang.String[] envp, java.io.File baseDir, java.io.OutputStream output)
command
- the command to executeenvp
- the environmentbaseDir
- the base directoryoutput
- Where store StdOut and StdErr of executable
public static java.lang.Integer execAndSaveOutput(java.lang.String[] command, java.lang.String[] envp, java.io.File baseDir, java.io.OutputStream output)
command
- the command to executeenvp
- the environmentbaseDir
- the base directoryoutput
- Where store StdOut and StdErr of executable
public static java.lang.Integer execPiped(java.lang.String command, java.lang.String[] envp, java.io.File baseDir)
command
- the command to executeenvp
- the environmentbaseDir
- the base directory
public static java.lang.Integer execAndSaveOutput(java.lang.String[] command, java.lang.String[] envp, java.io.File baseDir, java.io.File outputFile)
command
- the command to executeenvp
- the environmentbaseDir
- the base directoryoutputFile
- the output file
public static java.lang.Integer execAndSaveOutput(java.lang.String command, java.lang.String[] envp, java.io.File baseDir, java.io.File outputFile)
command
- the command to executeenvp
- the environmentbaseDir
- the base directoryoutputFile
- the output file
public static java.lang.Integer execPiped(java.lang.String[] command, java.lang.String[] envp, java.io.File baseDir)
command
- the command to executeenvp
- the environmentbaseDir
- the base directory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |