Re: File IO -- Reading Config Files Easily
- From: Eric Sosman <Eric.Sosman@xxxxxxx>
- Date: Thu, 30 Mar 2006 13:58:10 -0500
Eric Sosman wrote On 03/30/06 13:51,:
Hal Vaughan wrote On 03/30/06 13:27,:
I remember somewhere I saw a Java program that had a config file with
name/value pairs like:
alpha=one
beta=two
gamma=three
The programmer was using something in the Java API to easily read this in
and use the value pairs for setting variables, or maybe for setting values
in something like a HashMap or Vector. I can't remember what he used or
what it was called, but it was a basic shortcut from having to read the
file line by line, split each line on the "=", and parse the results.
Sounds like java.util.prefs.Preferences.
No; wait; sorry: Preferences stores its name/value
pairs in XML format, not in plain text. Monique Mudama
is probably right: take a look at java.util.Properties.
--
Eric.Sosman@xxxxxxx
.
- Follow-Ups:
- Re: File IO -- Reading Config Files Easily
- From: Monique Y. Mudama
- Re: File IO -- Reading Config Files Easily
- References:
- File IO -- Reading Config Files Easily
- From: Hal Vaughan
- Re: File IO -- Reading Config Files Easily
- From: Eric Sosman
- File IO -- Reading Config Files Easily
- Prev by Date: Re: File IO -- Reading Config Files Easily
- Next by Date: Re: A question about a generic method
- Previous by thread: Re: File IO -- Reading Config Files Easily
- Next by thread: Re: File IO -- Reading Config Files Easily
- Index(es):
Relevant Pages
|
|