|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
net.dpml.transit.Environment
public class Environment
Encapsulates operating system and shell specific access to environment variables.
Field Summary | |
---|---|
static String |
OSNAME
os.name System property |
static String |
USERNAME
user.name System property |
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
Environment()
Creates a snapshot of the current shell environment variables for a user. |
Method Summary | |
---|---|
static String |
getEnvVariable(String name)
Gets the value of a shell environment variable. |
static Properties |
getEnvVariables()
Gets all environment variables within a Properties instance where the key is the environment variable name and value is the value of the property. |
static String |
getUserShell()
Gets the user's shell executable. |
static boolean |
isNetWare()
Checks to see if the operating system is NetWare. |
static boolean |
isOpenVMS()
Checks to see if the operating system is OpenVMS. |
static boolean |
isUnix()
Checks to see if the operating system is a UNIX variant. |
static boolean |
isWindows()
Checks to see if the operating system is a Windows variant. |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String OSNAME
public static final String USERNAME
Constructor Detail |
---|
public Environment() throws EnvironmentException
EnvironmentException
- if there is an error accessing the environmentMethod Detail |
---|
public static String getEnvVariable(String name) throws EnvironmentException
name
- the name of variable
EnvironmentException
- if there is a problem accessing the environmentpublic static boolean isUnix()
public static boolean isWindows()
public static boolean isNetWare()
public static boolean isOpenVMS()
public static Properties getEnvVariables() throws EnvironmentException
EnvironmentException
- if os is not recognizedpublic static String getUserShell() throws EnvironmentException
EnvironmentException
- the there is a problem accessing shell
information
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |