Input Output Query

Hi all...Is it possible to upon clicking e.g a button to examine a text file, and if that file is lacking certain features/code (e.g set/get methods) to add text to the file?Any help/assitance/direction appreciated:
[250 byte] By [johrik] at [2007-9-26 3:25:10]
# 1

Yes,

Create a new file (B), then open the file you want to examine (A). Run the contents of A through a parser to check for the phrases you want, and keep track of what you find. Write the new content plus the old content to B. If the content of your file is in a rigid order you can write new lines or old content to B as you parse, but if it is in random order then you will have to keep the content from A in memory, or if too large, then write it to B and use a third file C to output your final content. If appropriate ename A or delete it, then rename your output file to what A was called before.

morgalr at 2007-6-29 11:45:44 > top of Java-index,Archived Forums,Java Programming...