If you don't have some form of delete indicator for each record, you
will have copy the file to a temporary file while removing the data.
Once the temporary file is created and filled, delete the original file
and rename the temporary file.

If you have a space for a delete indicator, I would suggest using a
RandomAccessFile, seek() to the desired location, and set the indicator.

Tim Galllagher

-----Original Message-----
From: Mario [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 11, 1999 5:37 AM
To: [EMAIL PROTECTED]
Subject: Re: how to delete files


class java.io.File, method delete()
Check API-documentation.
Mario
> hello,

> In the destroy method of my servlet I wanted to delete the entries in
a
> file.(not useing jdbc.  it is a flat file) can some one help me with
this.




>   Revathy R.


>   Revathy R.

>
________________________________________________________________________
___
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".

> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

________________________________________________________________________
___
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to