|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tribble.util.GetEnvironment
public class GetEnvironment
Contains the environment variable settings from the native operating system.
Copyright ©2006 by David R. Tribble, all rights reserved.
Permission is granted to any person or entity except those designated by
by the United States Department of State as a terrorist, or terrorist
government or agency, to use and distribute this source code provided
that the original copyright notice remains present and unaltered.
System.getenv()
Constructor Summary | |
---|---|
GetEnvironment()
|
Method Summary | |
---|---|
static java.lang.String |
getEnv(int index)
Retrieve a native environment variable setting by index. |
static java.lang.String |
getEnv(java.lang.String name)
Retrieve a native environment variable setting. |
static java.lang.String |
getEnvName(int index)
Retrieve a native environment variable name by index. |
static int |
getEnvSize()
Retrieve the number of native environment variables. |
static void |
main(java.lang.String[] args)
Test driver. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GetEnvironment()
Method Detail |
---|
public static java.lang.String getEnv(java.lang.String name) throws java.io.IOException
name
- Environment variable name to retrieve.
java.io.IOException
- Thrown if the local environment settings cannot be determined.public static java.lang.String getEnv(int index) throws java.io.IOException
index
- Index number of the environment variable value to retrieve.
java.lang.ArrayIndexOutOfBoundsException
- (unchecked)
Thrown if index does not specify a valid environment variable.
java.io.IOException
- Thrown if the local environment settings cannot be determined.public static java.lang.String getEnvName(int index) throws java.io.IOException
index
- Index number of the environment variable name to retrieve.
java.lang.ArrayIndexOutOfBoundsException
- (unchecked)
Thrown if index does not specify a valid environment variable.
java.io.IOException
- Thrown if the local environment settings cannot be determined.public static int getEnvSize()
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- Command line args (not used).
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |