lejos.util.jni
Class OSInfo

java.lang.Object
  extended by lejos.util.jni.OSInfo

public class OSInfo
extends java.lang.Object

Performs normalization of os.name and os.arch system properties.


Field Summary
static java.lang.String ARCH_ARM
           
static java.lang.String ARCH_PA_RISK
           
static java.lang.String ARCH_PPC
           
static java.lang.String ARCH_PPC64
           
static java.lang.String ARCH_SPARC
           
static java.lang.String ARCH_X86
           
static java.lang.String ARCH_X86_64
           
static java.lang.String OS_LINUX
           
static java.lang.String OS_MACOS
           
static java.lang.String OS_MACOSX
           
static java.lang.String OS_SOLARIS
           
static java.lang.String OS_WINDOWS
           
static java.lang.String OS_WINDOWS_CE
           
static java.lang.String UNKNOWN
           
 
Constructor Summary
OSInfo()
          Creates OSInfo-Object with Infos about the current System according to the System-properties.
OSInfo(java.lang.String os, java.lang.String arch, int datamodel)
           
 
Method Summary
 java.lang.String getArch()
          Get the name of the architecture.
 java.lang.String getOS()
          Get the name of the OS.
 boolean isArch(java.lang.String name)
           
 boolean isOS(java.lang.String name)
           
static void main(java.lang.String[] args)
          Deprecated. don't call it, only used for debugging/user assistance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARCH_X86

public static final java.lang.String ARCH_X86
See Also:
Constant Field Values

ARCH_X86_64

public static final java.lang.String ARCH_X86_64
See Also:
Constant Field Values

ARCH_PPC

public static final java.lang.String ARCH_PPC
See Also:
Constant Field Values

ARCH_PPC64

public static final java.lang.String ARCH_PPC64
See Also:
Constant Field Values

ARCH_SPARC

public static final java.lang.String ARCH_SPARC
See Also:
Constant Field Values

ARCH_PA_RISK

public static final java.lang.String ARCH_PA_RISK
See Also:
Constant Field Values

ARCH_ARM

public static final java.lang.String ARCH_ARM
See Also:
Constant Field Values

OS_WINDOWS_CE

public static final java.lang.String OS_WINDOWS_CE
See Also:
Constant Field Values

OS_WINDOWS

public static final java.lang.String OS_WINDOWS
See Also:
Constant Field Values

OS_LINUX

public static final java.lang.String OS_LINUX
See Also:
Constant Field Values

OS_MACOS

public static final java.lang.String OS_MACOS
See Also:
Constant Field Values

OS_MACOSX

public static final java.lang.String OS_MACOSX
See Also:
Constant Field Values

OS_SOLARIS

public static final java.lang.String OS_SOLARIS
See Also:
Constant Field Values

UNKNOWN

public static final java.lang.String UNKNOWN
See Also:
Constant Field Values
Constructor Detail

OSInfo

public OSInfo()
       throws java.io.IOException
Creates OSInfo-Object with Infos about the current System according to the System-properties.

Throws:
java.io.IOException

OSInfo

public OSInfo(java.lang.String os,
              java.lang.String arch,
              int datamodel)
       throws java.io.IOException
Parameters:
os -
arch -
datamodel -
Throws:
java.io.IOException
Method Detail

getOS

public java.lang.String getOS()
Get the name of the OS.

Returns:
the name of the OS

getArch

public java.lang.String getArch()
Get the name of the architecture.

Returns:
the name of the architecture

isOS

public boolean isOS(java.lang.String name)

isArch

public boolean isArch(java.lang.String name)

main

@Deprecated
public static void main(java.lang.String[] args)
                 throws java.io.IOException
Deprecated. don't call it, only used for debugging/user assistance

Throws:
java.io.IOException