append to begining of file
Posted on 2004-08-04
Is there any easy way I can append a string to the begining of a file ? I know a coupla ways but not happy with them..
1. I can read the entire file and then create a new file but this time inserting a new string at the begining. This is not a good soln bcos the file is a huge log.
2. Using RandomAccessFile, I can insert at the begining but it rather does a replace than an insert.
appreciate any suggestions,