Deleting parts of a data file in java
问题 I have a file which I write some java objects. After writing, sometimes I need to delete some of these objects placed at ramndom positions in the file. Is there a way to delete a selected object from the file without replacing the whole file? Thank you. 回答1: No, this is fundamentally something that most file systems don't support. (There may be some with special data structures to make it cheap, but most don't - and the standard APIs don't support the idea.) The simplest way of "deleting"