Re: File IO -- Reading Config Files Easily





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.

--
Eric.Sosman@xxxxxxx

.



Relevant Pages

  • Re: gets() is dead
    ... Which means that when the command come from ... OS and maybe shell is in use, to parse it correctly. ... You assume a naive programmer. ...
    (comp.lang.c)
  • Re: 10 ten things any good programmer can/has done?
    ... >>>programmer can write a LOT of code without having to parse squat. ... I've used lots of user interfaces by programmers who knew nothing ... > nothing about parsing. ...
    (comp.programming)
  • Re: 10 ten things any good programmer can/has done?
    ... >>For example, every good programmer should know how to parse, so every ... Why should every good programmer know how to parse? ... As for the tools, they evolve, depending on your projects, and the ... declared DAO dead, I almost fell off my chair. ...
    (comp.programming)
  • Re: 10 ten things any good programmer can/has done?
    ... >>programmer can write a LOT of code without having to parse squat. ... I would say MOST user interfaces are by programmers who know ... nothing about parsing. ...
    (comp.programming)
  • Re: 10 ten things any good programmer can/has done?
    ... Julienne Walker wrote: ... >>I think that every good programmer should have a number of utilities, packages, ... >>wrappers, libraries, whatever for use in whatever projects they work on (or will ... Why should every good programmer know how to parse? ...
    (comp.programming)