|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectch.sf.htt.Environment
public class Environment
Abstracts environment variables. On Windows names of environment variables are not case sensitive. If the OS is Windows, names of environment variables are converted to all lower case, e.g. "Path" to "path": All methods that are given names of environment variables can use any case, i.e. are converted to lower case within the method; returned names of environment variables are all lower case. On all other OSes no conversion is done.
| Constructor Summary | |
|---|---|
Environment()
Constructor, gets same environment as current process. |
|
Environment(java.util.Map<java.lang.String,java.lang.String> environmentMap)
Constructor from explicit environment map, given in same format as returned by System.getenv(). |
|
| Method Summary | |
|---|---|
void |
addToPath(java.io.File dir)
Add path directory file to path environment variable. |
void |
addToPath(java.lang.String dir)
Add path directory to path environment variable. |
java.util.Map<java.lang.String,java.lang.String> |
getEnvironmentMap()
|
java.lang.String[] |
getEnvp()
Get environment array in format needed for Runtime().exec(), i.e. |
java.lang.String |
getValue(java.lang.String key)
Return value for given key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Environment(java.util.Map<java.lang.String,java.lang.String> environmentMap)
environmentMap - environment mappublic Environment()
| Method Detail |
|---|
public void addToPath(java.lang.String dir)
dir - directorypublic void addToPath(java.io.File dir)
dir - directory filepublic java.lang.String[] getEnvp()
public java.util.Map<java.lang.String,java.lang.String> getEnvironmentMap()
public java.lang.String getValue(java.lang.String key)
key - key
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||