Reputation: 157
How can I write something in a binary file, at a certain position, without having to copy the entire file, delete it and rewrite it with one value changed ?
I've tried with FileOutputStream
but I can only append or truncate the file.
Upvotes: 1
Views: 1103
Reputation: 148
In Java you can use a Random access file. You can set the position of the marker. Allowing you to choose where the next read or write occurs.
Upvotes: 6