DbtuTools project
Java Library

org.dbtutools.DbtuTools.core.os
Class System

java.lang.Object
  |
  +--org.dbtutools.DbtuTools.core.os.System

public class System
extends java.lang.Object

The System class provides operating system related stuff. It cannot be instantiated.

Author:
Daniel Scheibli <daniel.scheibli at edelbyte.org> *************************************************************************

Field Summary
static int ENDIAN_TYPE_BIG
          Constant standing for all big endian platforms as most RISC machines are.
static int ENDIAN_TYPE_LITTLE
          Constant standing for all little endian platforms as systems with Intel x86 processor(s) are.
static int OS_FAMILY_UNIX
          Constant standing for the Unix operating systems, like IBM's AIX, Linux, Sun Solaris and others.
static int OS_FAMILY_WINTEL
          Constant standing for all DOS succession operating systems, like the Microsoft Windows family and IBM's OS/2.
 
Method Summary
static int getEndianType()
          Detects and returns the endian type of the current running platform.

Background: The detection is done by calling the ApiWrapper.getEndianType() method.
static int getOsFamily()
          Detects and returns the operating system family.

Background: The detection is done by calling the System.getOsFamily() method.
static int getParentProcessId()
          Detects and returns the Parent Process ID (identifies the caller of the Java program).

Background: The detection is done by interpreting the value of java.lang.System.getProperty("PPID");
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OS_FAMILY_WINTEL

public static final int OS_FAMILY_WINTEL
Constant standing for all DOS succession operating systems, like the Microsoft Windows family and IBM's OS/2. ************************************************************************

See Also:
Constant Field Values

OS_FAMILY_UNIX

public static final int OS_FAMILY_UNIX
Constant standing for the Unix operating systems, like IBM's AIX, Linux, Sun Solaris and others. ************************************************************************

See Also:
Constant Field Values

ENDIAN_TYPE_LITTLE

public static final int ENDIAN_TYPE_LITTLE
Constant standing for all little endian platforms as systems with Intel x86 processor(s) are. ************************************************************************

See Also:
Constant Field Values

ENDIAN_TYPE_BIG

public static final int ENDIAN_TYPE_BIG
Constant standing for all big endian platforms as most RISC machines are. ************************************************************************

See Also:
Constant Field Values
Method Detail

getEndianType

public static int getEndianType()
                         throws UnknownValueException
Detects and returns the endian type of the current running platform.

Background: The detection is done by calling the ApiWrapper.getEndianType() method.

Returns:
ENDIAN_TYPE_LITTLE - For the case, that a little endian platform was detected.
ENDIAN_TYPE_BIG - For the case, that a big endian platform was detected.
Throws:
UnknownValueException - For the case, that the endian type could not be detected.
************************************************************************

getOsFamily

public static int getOsFamily()
                       throws UnknownValueException
Detects and returns the operating system family.

Background: The detection is done by calling the System.getOsFamily() method.

Returns:
OS_FAMILY_UNIX - For the case, that a Unix family operating system was detected.
OS_FAMILY_WINTEL - For the case, that a Wintel family operating system was detected.
Throws:
UnknownValueException - For the case, that the operating system family could not be detected.
************************************************************************

getParentProcessId

public static int getParentProcessId()
                              throws UnknownValueException
Detects and returns the Parent Process ID (identifies the caller of the Java program).

Background: The detection is done by interpreting the value of java.lang.System.getProperty("PPID");

Returns:
The Process ID of the parent program.
Throws:
UnknownValueException - For the case, that the Parent Process ID could not be detected.
************************************************************************

DbtuTools project
Java Library