org.arakhne.vmutil
Enum OperatingSystem

java.lang.Object
  extended by java.lang.Enum<OperatingSystem>
      extended by org.arakhne.vmutil.OperatingSystem
All Implemented Interfaces:
Serializable, Comparable<OperatingSystem>

public enum OperatingSystem
extends Enum<OperatingSystem>

This is a list of supported operating system.

Version:
6.3 (rev:285) 2011-10-14 12:02:41
Author:
Stéphane GALLAND
Maven Group Id:
org.arakhne.afc
Maven Artifact Id:
arakhneVmutils

Enum Constant Summary
AIX
          AIX®.
BSD
          Standard BSD.
FREEBSD
          Free BSD.
HPUX
          HPUX®.
LINUX
          Linux distribution.
MACOSX
          Mac OS X®.
NETBSD
          Net BSD.
OPENBSD
          Open BSD.
OTHER
          Unknown operating systems.
SOLARIS
          Solaris®.
WIN
          Windows®.
 
Method Summary
static OperatingSystem getCurrentOS()
          Replies the current operating system.
static String getCurrentOSName()
          Replies the name of the current OS.
static String getCurrentOSVersion()
          Replies the version of the current OS.
static OperatingSystemIdentificationType getIdentificationType()
          Replies the type of identification found on this operating system.
static int getOperatingSystemArchitectureDataModel()
          Replies the data model of the current operating system: 32 or 64 bits.
static String getOSSerialNumber()
          Get the OS serial number.
static String getOSSerialNumber(boolean enableSuperUser, boolean enableGUI)
          Get the OS serial number.
static String getOSUUID()
          Get the OS UUID.
static String getOSUUID(boolean enableSuperUser, boolean enableGUI)
          Get the OS UUID.
static boolean is32BitOperatingSystem()
          Replies if the current operating system is 32bit.
static boolean is64BitOperatingSystem()
          Replies if the current operating system is 64bit.
 boolean isCurrentOS()
          Replies if the current OperatingSystem constant is corresponding to the current operating system.
 boolean isUnixCompliant()
          Replies of this OS is Unix compliant.
static OperatingSystem valueOf(String name)
          Returns the enum constant of this type with the specified name.
static OperatingSystem[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

WIN

public static final OperatingSystem WIN
Windows®.


LINUX

public static final OperatingSystem LINUX
Linux distribution.


SOLARIS

public static final OperatingSystem SOLARIS
Solaris®.


MACOSX

public static final OperatingSystem MACOSX
Mac OS X®.


FREEBSD

public static final OperatingSystem FREEBSD
Free BSD.


NETBSD

public static final OperatingSystem NETBSD
Net BSD.


BSD

public static final OperatingSystem BSD
Standard BSD.


OPENBSD

public static final OperatingSystem OPENBSD
Open BSD.


AIX

public static final OperatingSystem AIX
AIX®.


HPUX

public static final OperatingSystem HPUX
HPUX®.


OTHER

public static final OperatingSystem OTHER
Unknown operating systems.

Method Detail

values

public static OperatingSystem[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OperatingSystem c : OperatingSystem.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OperatingSystem valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getIdentificationType

public static OperatingSystemIdentificationType getIdentificationType()
Replies the type of identification found on this operating system.

Returns:
the type of identification found on this operating system.

isCurrentOS

public boolean isCurrentOS()
Replies if the current OperatingSystem constant is corresponding to the current operating system.

Returns:
true if the current operating system corresponds to this constant, otherwise false

isUnixCompliant

public boolean isUnixCompliant()
Replies of this OS is Unix compliant.

Returns:
true if this constant corresponds to a Unix-like operating system, otherwise false

getCurrentOSName

public static String getCurrentOSName()
Replies the name of the current OS.

Returns:
the name of the current operating system.
See Also:
System.getProperty(java.lang.String)

getCurrentOSVersion

public static String getCurrentOSVersion()
Replies the version of the current OS.

Returns:
the version of the current operating system.
See Also:
System.getProperty(java.lang.String)

getCurrentOS

public static OperatingSystem getCurrentOS()
Replies the current operating system.

Returns:
the current operating system constant.

getOperatingSystemArchitectureDataModel

public static int getOperatingSystemArchitectureDataModel()
Replies the data model of the current operating system: 32 or 64 bits.

Returns:
the integer which is corresponding to the data model, or 0 if it could not be determined.

is64BitOperatingSystem

public static boolean is64BitOperatingSystem()
Replies if the current operating system is 64bit.

Returns:
true if the operating system is 64bits, othewise false

is32BitOperatingSystem

public static boolean is32BitOperatingSystem()
Replies if the current operating system is 32bit.

Returns:
true if the operating system is 32bits, othewise false

getOSSerialNumber

public static String getOSSerialNumber()
Get the OS serial number.

This function does not allow to run any system command with the super-user rights, and it disable any additional GUI.

Returns:
the serial number associated to the current operating system.

getOSSerialNumber

public static String getOSSerialNumber(boolean enableSuperUser,
                                       boolean enableGUI)
Get the OS serial number.

Parameters:
enableSuperUser - indicates if the super-user commands are enabled or not.
enableGUI - indicates if any additional GUI could be opened, or not.
Returns:
the serial number associated to the current operating system.

getOSUUID

public static String getOSUUID()
Get the OS UUID.

This function does not allow to run any system command with the super-user rights, and it disable any additional GUI.

Returns:
an unique identifier for the current operating system.

getOSUUID

public static String getOSUUID(boolean enableSuperUser,
                               boolean enableGUI)
Get the OS UUID.

Parameters:
enableSuperUser - indicates if the super-user commands are enabled or not.
enableGUI - indicates if any additional GUI could be opened, or not.
Returns:
an unique identifier for the current operating system.
Since:
6.1


Copyright © 2006-2011 Arakhnê.org Consortium. All rights reserved under LGPL license terms.