On Thursday 14 April 2005 10:55, Emmanuel Bourg wrote:
> Oliver Siegmar wrote:
> > Does your implementation has default (a.k.a. global, a.k.a. common)
> > section support?
>
> What do you mean by default section exactly ? Currently my
> implementation does the following:

Many application ini files have some kind of default-section. Consider the 
following ini-file:

--------------------------------
[default]
foo = 30
val = 50

[section1]
foo = 10
--------------------------------

In some applications the [default]-section is called [common] or [global] - or 
even different.

One of the constructors could be:

public IniFileConfiguration(String fileName, String defaultSection)


The application could be:

Configuration conf = new IniFileConfiguration("/tmp/test.ini", "default");

conf.getString("section1.foo") -> would return 10
conf.getString("section1.val") -> would return 50


Best,
Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to