com.novell.security.japi.pki
Class OSUtil

java.lang.Object
  |
  +--com.novell.security.japi.pki.OSUtil

public class OSUtil
extends java.lang.Object

The OSUtil class provides methods and utilities to help in dealing with the differences between operating systems.


Field Summary
static int AIX
          Specifies the AIX operating system.
static int HPUX
          Specifies the HP-UX operating system.
static int LINUX
          Specifies the Linux operating system.
static int NETWARE
          Specifies the NetWare operating system.
static int SOLARIS
          Specifies the Solaris operating system.
static int WINDOWS_XX
          Specifies the Windows operating system.
 
Constructor Summary
OSUtil()
           
 
Method Summary
static void delay(long milliSeconds)
          Delays for the specified number of milliseconds.
static java.lang.String formatMB(long num)
          Converts a long byte count into a string MB count of xxx.xx format.
static java.lang.String getFileSeparator()
          Returns the host operating system's file separator character (e.g., / or \).
static java.lang.String getJavaClassPath()
          Returns the Java classpath.
static java.lang.String getJavaClassVersion()
          Returns the version of the Java class library.
static java.lang.String getJavaHomeDir()
          Returns the home directory for the Java Virtual Machine (JVM).
static java.lang.String getJavaVendor()
          Returns the vendor name of the Java Virtual Machine (JVM).
static java.lang.String getJavaVendorURL()
          Returns the URL address of the Java Virtual Machine (JVM) vendor.
static java.lang.String getJavaVersion()
          Returns the version of the currently running Java Virtual Machine (JVM).
static java.lang.String getLineSeparator()
          Returns the host operating system's line separator character (e.g., \n or \r\n).
static java.lang.String getOSHardwareType()
          Returns the name of the host hardware architecture type.
static java.lang.String getOSName()
          Returns the name of the host operating system.
static int getOSType()
          Returns the type (as integer) of the host operating system.
static java.lang.String getOSVersion()
          Returns the version of the host operating system
static java.lang.String getPathSeparator()
          Returns the host operating system's path separator character (e.g., : or ;).
static java.lang.String getSystemAttribute(java.lang.String attributeName)
          Returns the systems attributes***.
static java.lang.String getUserDirctory()
          Returns the user's current working directory.
static java.lang.String getUserHomeDir()
          Returns the home directory of the current system user.
static java.lang.String getUserName()
          Returns the name of the current system user.
static int initOSType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NETWARE

public static final int NETWARE

Specifies the NetWare operating system.

See Also:
getOSType, Constant Field Values

WINDOWS_XX

public static final int WINDOWS_XX

Specifies the Windows operating system.

See Also:
getOSType(), Constant Field Values

SOLARIS

public static final int SOLARIS

Specifies the Solaris operating system.

See Also:
getOSType, Constant Field Values

LINUX

public static final int LINUX

Specifies the Linux operating system.

See Also:
getOSType, Constant Field Values

AIX

public static final int AIX

Specifies the AIX operating system.

See Also:
getOSType, Constant Field Values

HPUX

public static final int HPUX

Specifies the HP-UX operating system.

See Also:
getOSType, Constant Field Values
Constructor Detail

OSUtil

public OSUtil()
Method Detail

getOSType

public static int getOSType()
Returns the type (as integer) of the host operating system.

Returns:
the operating system

initOSType

public static int initOSType()

getOSName

public static java.lang.String getOSName()
Returns the name of the host operating system.

Returns:
OS name as a string

getOSVersion

public static java.lang.String getOSVersion()
Returns the version of the host operating system

Returns:
OS version as a string

getOSHardwareType

public static java.lang.String getOSHardwareType()
Returns the name of the host hardware architecture type.

Returns:
OS harware type as a string

getJavaVersion

public static java.lang.String getJavaVersion()
Returns the version of the currently running Java Virtual Machine (JVM).

Returns:
Java version as a string

getJavaVendor

public static java.lang.String getJavaVendor()
Returns the vendor name of the Java Virtual Machine (JVM).

Returns:
Java vendor as a string

getJavaVendorURL

public static java.lang.String getJavaVendorURL()
Returns the URL address of the Java Virtual Machine (JVM) vendor.

Returns:
Java vendor URL as a string

getJavaHomeDir

public static java.lang.String getJavaHomeDir()
Returns the home directory for the Java Virtual Machine (JVM).

Returns:
the directory Java is installed in

getJavaClassVersion

public static java.lang.String getJavaClassVersion()
Returns the version of the Java class library.

Returns:
Java class library version as a string

getJavaClassPath

public static java.lang.String getJavaClassPath()
Returns the Java classpath.

Returns:
Java classpath as a string

getFileSeparator

public static java.lang.String getFileSeparator()
Returns the host operating system's file separator character (e.g., / or \).

Returns:
OS dependent file seaparator as a string

getPathSeparator

public static java.lang.String getPathSeparator()
Returns the host operating system's path separator character (e.g., : or ;).

Returns:
OS dependent path separator as a string

getLineSeparator

public static java.lang.String getLineSeparator()
Returns the host operating system's line separator character (e.g., \n or \r\n).

Returns:
the host dependant line separator as a string

getUserName

public static java.lang.String getUserName()
Returns the name of the current system user.

Returns:
user name as a string

getUserHomeDir

public static java.lang.String getUserHomeDir()
Returns the home directory of the current system user.

Returns:
user's home directory as a string

getUserDirctory

public static java.lang.String getUserDirctory()
Returns the user's current working directory.

Returns:
user's current directory as a string

getSystemAttribute

public static java.lang.String getSystemAttribute(java.lang.String attributeName)
Returns the systems attributes***.

Parameters:
attributeName - Define***
Returns:
Define***

delay

public static void delay(long milliSeconds)
Delays for the specified number of milliseconds.

Parameters:
milliSeconds - to delay.

formatMB

public static java.lang.String formatMB(long num)
Converts a long byte count into a string MB count of xxx.xx format.

Parameters:
num - - the long byte count to convert.
Returns:
A string converted into MB count of xxx.xx format.