• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Delete data from random access file

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am doing program with RandomAccessFile class. I can write data to file and can read data from file. Now, if I want to delete perticular data from file, then is it possible to delete that data from that file. I am really confuse with that.
Please help me to getout from this confusion.
Thank you very much,
Samir
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Samir,
I'm not aware of any way that you can delete data from an existing file using RandomAccessFile or any other Java class. I believe that you'd have to create a new file that only contains the data you want to keep and replace the original file with the new one.
------------------
Brett Spell
Author, Professional Java Programming
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic