Re: Deleting contents of file



On Thu, 28 Feb 2008 04:12:26 -0800 (PST),
christopher_board@xxxxxxxxxxx wrote, quoted or indirectly quoted
someone who said :

I am currently devloping a java application where the application when
it is launched reads in a CSV file and then populates that data into a
JList. I would like the user to be able to select an item from the
JList and then click a button which deletes the row that item is in
within the CSV file. How would I go about doing this.

the only way to delete a string in a file is to copy the file up to
the slice, skip over the slice, and write the rest.

You can also chop a file, cutting off the tail.

See http://mindprod.com/jgloss/file.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.