| Author |
How to manage a text file is a List or something similar.
|
Paul Duer
Ranch Hand
Joined: Oct 10, 2002
Posts: 98
|
|
Hi guys, I have 2 text files, each is in the standard Key=Value style. I would like to be able to quickly read those files into a List object of some sort, and then be able to add pairs to the end of the file and maybe if I get more advanced, change values in the pairs. I think this is real simple thing, I just can't think of what package might make this eaisest. I also have an XML file to manage, basically adding and editing elements quickly and programmatically.
|
 |
Rachel Swailes
Ranch Hand
Joined: May 18, 2004
Posts: 434
|
|
|
For the standard key=value, have a look at Properties Files.
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24041
|
|
|
Rachel is correctly pointing you to the java.util.Properties class.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Layne Lund
Ranch Hand
Joined: Dec 06, 2001
Posts: 3061
|
|
For XML files, you have to look at third-party implementations of DOM. Apache's Xerces is a popular DOM implementation. HTH Layne
|
Java API Documentation
The Java Tutorial
|
 |
 |
|
|
subject: How to manage a text file is a List or something similar.
|
|
|