org.dmonix.util
Class SystemPropertyHandler

java.lang.Object
  extended byorg.dmonix.util.SystemPropertyHandler

public abstract class SystemPropertyHandler
extends java.lang.Object

Class for getting System parameters.

The class includes convenient methods for extracting System properties.

Copyright: Copyright (c) 2003

Company: dmonix.org

Version:
1.0
Author:
Peter Nerg

Field Summary
static java.lang.String FILE_SEPARATOR
           
static java.lang.String JAVA_CLASS_PATH
           
static java.lang.String JAVA_HOME
           
static java.lang.String JAVA_LIB_PATH
           
static java.lang.String JAVA_RUNTIME_NAME
           
static java.lang.String JAVA_RUNTIME_VERSION
           
static java.lang.String JAVA_VENDOR_URL
           
static java.lang.String JAVA_VERSION
           
static java.lang.String JAVA_VM_VENDOR
           
static java.lang.String JAVA_VM_VERSION
           
static java.lang.String LINE_SEPARATOR
           
static java.lang.String OS_NAME
           
static java.lang.String PATH_SEPARATOR
           
static java.lang.String USER_COUNTRY
           
static java.lang.String USER_HOME
           
static java.lang.String USER_NAME
           
 
Constructor Summary
SystemPropertyHandler()
           
 
Method Summary
static void debug()
          Prints out all System properties to System.out.
static void debug(java.io.PrintStream ostream)
          Prints out all System properties.
static java.lang.String getFileSeparator()
          Get the System property file separator.
static java.lang.String getJavaHome()
          Get the System property Java home.
static java.lang.String getJavaLibPath()
          Get the System property Java lib path.
static java.lang.String getJavaRuntimeName()
          Get the System property Java runtime name.
static java.lang.String getJavaRuntimeVersion()
          Get the System property Java runtime version.
static java.lang.String getJavaVendorUrl()
          Get the System property Java vendor url.
static java.lang.String getJavaVersion()
          Get the System property Java version.
static java.lang.String getJavaVMVendor()
          Get the System property Java VM vendor.
static java.lang.String getJavaVMVersion()
          Get the System property Java VM version.
static java.lang.String getLineSeparator()
          Get the System property line separator.
static java.lang.String getOSName()
          Get the System property OS name.
static java.lang.String getPathSeparator()
          Get the System property Path separator.
static java.lang.String getProperty(java.lang.String property)
          Get the requested system property.
static java.lang.String getUserCountry()
          Get the System property user country.
static java.lang.String getUserHome()
          Get the System property user home.
static java.lang.String getUserName()
          Get the System property user name.
static void main(java.lang.String[] param)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_SEPARATOR

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

JAVA_CLASS_PATH

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

JAVA_HOME

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

JAVA_LIB_PATH

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

JAVA_RUNTIME_NAME

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

JAVA_RUNTIME_VERSION

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

JAVA_VENDOR_URL

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

JAVA_VERSION

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

JAVA_VM_VENDOR

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

JAVA_VM_VERSION

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

LINE_SEPARATOR

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

OS_NAME

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

PATH_SEPARATOR

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

USER_COUNTRY

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

USER_HOME

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

USER_NAME

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

SystemPropertyHandler

public SystemPropertyHandler()
Method Detail

debug

public static void debug()
Prints out all System properties to System.out.


debug

public static void debug(java.io.PrintStream ostream)
Prints out all System properties.

Parameters:
ostream - The stream to write to

getFileSeparator

public static java.lang.String getFileSeparator()
Get the System property file separator.

Returns:
The property, null if not found

getJavaHome

public static java.lang.String getJavaHome()
Get the System property Java home.

Returns:
The property, null if not found

getJavaLibPath

public static java.lang.String getJavaLibPath()
Get the System property Java lib path.

Returns:
The property, null if not found

getJavaRuntimeName

public static java.lang.String getJavaRuntimeName()
Get the System property Java runtime name.

Returns:
The property, null if not found

getJavaRuntimeVersion

public static java.lang.String getJavaRuntimeVersion()
Get the System property Java runtime version.

Returns:
The property, null if not found

getJavaVendorUrl

public static java.lang.String getJavaVendorUrl()
Get the System property Java vendor url.

Returns:
The property, null if not found

getJavaVersion

public static java.lang.String getJavaVersion()
Get the System property Java version.

Returns:
The property, null if not found

getJavaVMVendor

public static java.lang.String getJavaVMVendor()
Get the System property Java VM vendor.

Returns:
The property, null if not found

getJavaVMVersion

public static java.lang.String getJavaVMVersion()
Get the System property Java VM version.

Returns:
The property, null if not found

getLineSeparator

public static java.lang.String getLineSeparator()
Get the System property line separator.

Returns:
The property, null if not found

getOSName

public static java.lang.String getOSName()
Get the System property OS name.

Returns:
The property, null if not found

getPathSeparator

public static java.lang.String getPathSeparator()
Get the System property Path separator.

Returns:
The property, null if not found

getUserCountry

public static java.lang.String getUserCountry()
Get the System property user country.

Returns:
The property, null if not found

getUserName

public static java.lang.String getUserName()
Get the System property user name.

Returns:
The property, null if not found

getUserHome

public static java.lang.String getUserHome()
Get the System property user home.

Returns:
The property, null if not found

getProperty

public static java.lang.String getProperty(java.lang.String property)
Get the requested system property.

Parameters:
property - The property to get
Returns:
The property, null if not found

main

public static void main(java.lang.String[] param)


Copyright © 1998-2005 dmonix.org Peter Nerg, All Rights Reserved.