com.myJava.system
Class OSTool
java.lang.Object
com.myJava.system.OSTool
public class OSTool
- extends java.lang.Object
Utility class for all system calls
- Author:
- Olivier PETRUCCI
Areca Build ID : 7299034069467778562
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OSTool
public OSTool()
getCharsets
public static java.nio.charset.Charset[] getCharsets()
getOSDescription
public static java.lang.String getOSDescription()
getJavaFileEncoding
public static java.lang.String getJavaFileEncoding()
getIANAFileEncoding
public static java.lang.String getIANAFileEncoding()
getUserLanguage
public static java.lang.String getUserLanguage()
getLineSeparator
public static java.lang.String getLineSeparator()
getUserHome
public static java.lang.String getUserHome()
getUserDir
public static java.lang.String getUserDir()
getUserName
public static java.lang.String getUserName()
getTempDirectory
public static java.lang.String getTempDirectory()
launchBrowser
public static void launchBrowser(java.net.URL url)
throws OSToolException,
NoBrowserFoundException
- Attempts to launch the default external browser.
- Throws:
OSToolException
NoBrowserFoundException
execute
public static int execute(java.lang.String[] cmd)
throws java.io.IOException
- Throws:
java.io.IOException
execute
public static int execute(java.lang.String[] cmd,
boolean async)
throws java.io.IOException
- Throws:
java.io.IOException
launchBrowser
public static void launchBrowser(java.lang.String url)
throws OSToolException,
NoBrowserFoundException
- Attempts to launch the default external browser.
- Throws:
OSToolException
NoBrowserFoundException
isSystemWindows
public static boolean isSystemWindows()
isSystemMACOS
public static boolean isSystemMACOS()
getMaxMemory
public static long getMaxMemory()
getMaxMemoryKB
public static long getMaxMemoryKB()
getMaxMemoryMB
public static long getMaxMemoryMB()
getTotalMemory
public static long getTotalMemory()
getFreeMemory
public static long getFreeMemory()
getMemoryUsage
public static long getMemoryUsage()
getJavaVersion
public static int[] getJavaVersion()
getFormattedJavaVersion
public static java.lang.String getFormattedJavaVersion()
getVMDescription
public static java.lang.String getVMDescription()
isJavaVersionGreaterThanOrEquals
public static boolean isJavaVersionGreaterThanOrEquals(int[] referenceVersion)
getJavaVendor
public static java.lang.String getJavaVendor()
formatJavaVersion
public static java.lang.String formatJavaVersion(int[] version)