From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47bc849aad30d586 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-29 00:22:49 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: volkert.barr@freenet.de (Volkert) Newsgroups: comp.lang.ada Subject: Re: A standard package for config files is needed Date: 29 May 2002 00:22:49 -0700 Organization: http://groups.google.com/ Message-ID: <39ee2480.0205282322.3bbd4673@posting.google.com> References: NNTP-Posting-Host: 130.149.16.75 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1022656969 3629 127.0.0.1 (29 May 2002 07:22:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 29 May 2002 07:22:49 GMT Xref: archiver1.google.com comp.lang.ada:24909 Date: 2002-05-29T07:22:49+00:00 List-Id: Preben Randhol wrote in message news:... > > So I hope now to kick off a discussion around this. The Java Property class is simple and easy to use! The Properties can be stored as an ASCI File, which is a List of (Key,Value) pairs. The Ada Version should be a bit more powerfull. e.g store triples of (Scope,Key,Value), may be in be form you described above: Scope.Key=Value >Program.Name=SuperDuperApp >Program.Version=1.0 >Directory.Help=/usr/doc/SuperDuperApp/ >Directory.Graphics=/usr/share/pixmaps/SuperDuperApp, The Java Interfaces may be a starting point! String getProperty(String key) Searches for the property with the specified key in this property list. String getProperty(String key, String defaultValue) Searches for the property with the specified key in this property list. void list(PrintStream out) Prints this property list out to the specified output stream. void list(PrintWriter out) Prints this property list out to the specified output stream. void load(InputStream inStream) Reads a property list (key and element pairs) from the input stream. Enumeration propertyNames() Returns an enumeration of all the keys in this property list, including the keys in the default property list. Object setProperty(String key, String value) Volkert