Re: File IO -- Reading Config Files Easily
- From: "jcsnippets.atspace.com" <admin@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 21:08:25 GMT
"Hal Vaughan" <hal@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:uZOdnUZ04oZ4v7HZRVn-ig@xxxxxxxxxxxxxx
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.
Any help on what would do this or what to call it?
It's the Properties class - more information and sample code can be found in
the following link.
http://jcsnippets.atspace.com/java/input-output/store-program-settings.html
Best regards,
JC
--
http://jcsnippets.atspace.com/
a collection of source code, tips and tricks
.
- References:
- File IO -- Reading Config Files Easily
- From: Hal Vaughan
- File IO -- Reading Config Files Easily
- Prev by Date: Re: File IO -- Reading Config Files Easily
- Next by Date: Re: Upload Images in JSP
- Previous by thread: Re: File IO -- Reading Config Files Easily
- Next by thread: Re: File IO -- Reading Config Files Easily
- Index(es):
Relevant Pages
|