RE: Java Question

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Bart Garst
Date:  
To: plug-discuss
Subject: RE: Java Question
>
> I have a file I want to locate a word within the file and then erase that
> word without erasing the rest of the file. So far all I can get
> out of this
> is to read in each character until I find the characters in the
> order I need
> and then I know the location of the word and where I need to delete.
> Unfortunatly I do not know how to go back into the file and
> delete just the
> specific characters I want to delete...I need to do this in Java.
>
> Any suggestions
>
> Ben
>


Sounds a bit like a class assignment...

How about:
Read the original file into memory, examining every word as you go &
replacing the targeted words. Then when you write out the contents,
overwriting the original file, the new words (or lack thereof) will be in
place.

Bart

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss