jcifs.util
Class Config

java.lang.Object
  |
  +--jcifs.util.Config

public class Config
extends Object

This class uses a static PropertiesTree to act as a cental repository of configuration information. When initialized for the first time the system properties will constitute it's initial properties.

See also Setting JCIFS Properties


Constructor Summary
Config()
           
 
Method Summary
static Object get(String key)
          Retrieve a property from the static PropertiesTree.
static boolean getBoolean(String key, boolean def)
          Retrieve a boolean value.
static InetAddress getInetAddress(String key, InetAddress def)
          Retrieve an address from the PropertiesTree and return as InetAddress.
static int getInt(String key)
          Retrieve an int from the PropertiesTree.
static int getInt(String key, int def)
           
static String getProperty(String key)
          Retrieve a property from the static PropertiesTree.
static String getProperty(String key, String def)
          Retrieve a property from the static PropertiesTree.
static void init()
          This method is actually empty.
static Object setProperty(String key, String value)
          Put a property into the static PropertiesTree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Config

public Config()
Method Detail

init

public static void init()
This method is actually empty. Indirectly it ensures that the static initializer is called which loads the system properties. It also adds the jcifs package name to the System properties for the java.net.URL handler.

setProperty

public static Object setProperty(String key,
                                 String value)
Put a property into the static PropertiesTree. This is probably the easiest way to set jcifs properties.

get

public static Object get(String key)
Retrieve a property from the static PropertiesTree.

getProperty

public static String getProperty(String key,
                                 String def)
Retrieve a property from the static PropertiesTree. The default value will be returned if the key is not found in the PropertiesTree.

getProperty

public static String getProperty(String key)
Retrieve a property from the static PropertiesTree.

getInt

public static int getInt(String key,
                         int def)

getInt

public static int getInt(String key)
Retrieve an int from the PropertiesTree.

getInetAddress

public static InetAddress getInetAddress(String key,
                                         InetAddress def)
Retrieve an address from the PropertiesTree and return as InetAddress.

getBoolean

public static boolean getBoolean(String key,
                                 boolean def)
Retrieve a boolean value.