FileDocCategorySizeDatePackage
ConfigurationExample.javaAPI DocExample1635Wed May 18 09:39:00 BST 2005com.discursive.jccook.configuration

ConfigurationExample

public class ConfigurationExample extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


		ConfigurationExample example = new ConfigurationExample();

		ConfigurationFactory factory = new ConfigurationFactory();
		URL configURL = example.getClass().getResource("configuration.xml");
		factory.setConfigurationURL( configURL );
		
		Configuration config = factory.getConfiguration();
		
		System.out.println( "Timeout: " + config.getFloat("timeout"));
		System.out.println( "Region: " + config.getString("region"));
		System.out.println( "Name: " + config.getString("name"));
		System.out.println( "Speed: " + config.getInt("speed"));