com.jniwrapper.win32.system
Class SystemVariables

java.lang.Object
  extended by com.jniwrapper.win32.system.SystemVariables
All Implemented Interfaces:
EnvironmentVariables

public class SystemVariables
extends java.lang.Object
implements EnvironmentVariables

This class allows managing system environment variables.


Constructor Summary
SystemVariables()
           
 
Method Summary
 boolean contains(java.lang.String variable)
          Verifies if there is a specified variable in the environment.
 java.lang.String getValue(java.lang.String variable)
          Returns the value of the specified variable from the environment block of the calling process.
 java.lang.String[] getVariableNames()
          Returns an array of variable names.
 void release()
          Releases resources allocated for this object.
 void removeVariable(java.lang.String variable)
          Removes specified environment variable
 void setValue(java.lang.String variable, java.lang.String value)
          Sets the value of an environment variable for the current process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemVariables

public SystemVariables()
Method Detail

getValue

public java.lang.String getValue(java.lang.String variable)
Returns the value of the specified variable from the environment block of the calling process.

Specified by:
getValue in interface EnvironmentVariables
Parameters:
variable - name of the variable to get the value for.
Returns:
value for the variable.

setValue

public void setValue(java.lang.String variable,
                     java.lang.String value)
Sets the value of an environment variable for the current process.

Specified by:
setValue in interface EnvironmentVariables
Parameters:
variable - variable name.
value - variable value.

removeVariable

public void removeVariable(java.lang.String variable)
Removes specified environment variable

Specified by:
removeVariable in interface EnvironmentVariables
Parameters:
variable - variable name.

contains

public boolean contains(java.lang.String variable)
Verifies if there is a specified variable in the environment.

Specified by:
contains in interface EnvironmentVariables
Parameters:
variable - variable name.
Returns:
true, if the specified variable exists in the environment; otherwise false.

getVariableNames

public java.lang.String[] getVariableNames()
Returns an array of variable names.

Specified by:
getVariableNames in interface EnvironmentVariables
Returns:
an array of variable names.

release

public void release()
Releases resources allocated for this object.