public final class SystemUtil extends Object
Modifier and Type | Method and Description |
---|---|
static long |
getFreeMemory() |
static String |
getPropertyOrEnvironmentVariable(String name)
Gets either java property or environment variable with given name.
|
static long |
getRelativeTimeMillis()
Should be used in relative constructs (for example to check how many milliseconds have passed).
|
static int |
getTimeBasedIntSeed() |
static long |
getTimeBasedSeed() |
static StringBuilder |
runProcessAndCollectErrors(String execPath, String params) |
static int |
runProcessAndGetExitCode(String exec, String params) |
static int |
runProcessAndGetExitCode(String exec, String params, String workingDirPath) |
static String |
runProcessAndGetOutput(String command, String params) |
static ProcessInfo |
runProcessAndGetProcessInfo(String command, String params) |
static boolean |
runProcessAndWait(String exec, String params) |
static boolean |
runProcessAndWait(String exec, String params, String workingDirPath) |
public static long getTimeBasedSeed()
public static int getTimeBasedIntSeed()
public static long getRelativeTimeMillis()
Shouldn't be used in the Date creation since the value returned by this method is different in С#. For getting current time consistently use DateTimeUtil.getCurrentTimeDate()
.
public static long getFreeMemory()
public static String getPropertyOrEnvironmentVariable(String name)
name
- the name of either java property or environment variable.
public static boolean runProcessAndWait(String exec, String params) throws IOException, InterruptedException
IOException
InterruptedException
public static boolean runProcessAndWait(String exec, String params, String workingDirPath) throws IOException, InterruptedException
IOException
InterruptedException
public static int runProcessAndGetExitCode(String exec, String params) throws IOException, InterruptedException
IOException
InterruptedException
public static int runProcessAndGetExitCode(String exec, String params, String workingDirPath) throws IOException, InterruptedException
IOException
InterruptedException
public static String runProcessAndGetOutput(String command, String params) throws IOException
IOException
public static StringBuilder runProcessAndCollectErrors(String execPath, String params) throws IOException
IOException
public static ProcessInfo runProcessAndGetProcessInfo(String command, String params) throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 1998–2022 iText Group NV. All rights reserved.