org.riotfamily.website.css
Class IniFile

java.lang.Object
  extended by org.riotfamily.website.css.IniFile

public class IniFile
extends Object

Reads config files with multiple sections. Example:

 var1 = foo
 
 [section1]
 ; some comment
 var1 = 123
 var2 = false
 
 [section2]
 var1 = something ; another comment
 var2 = true
 

Values that are defined before the first section is declared, will automatically be placed in a section called 'global'.

The strings 'true' and 'false' are converted to java.lang.Boolean, whereas strings that can be parsed as integer value are converted to java.lang.Integer. All other values remain unmodified.


Field Summary
static String GLOBAL_SECTION
           
 
Constructor Summary
IniFile(File file)
           
 
Method Summary
 Map<String,Map<String,Object>> getSections()
           
 long lastModified()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLOBAL_SECTION

public static final String GLOBAL_SECTION
See Also:
Constant Field Values
Constructor Detail

IniFile

public IniFile(File file)
        throws IOException
Throws:
IOException
Method Detail

lastModified

public long lastModified()

getSections

public Map<String,Map<String,Object>> getSections()