Kums Vijayan wrote:How to append to the start of file?
Well, by definition, "append" means to the end, doesn't it? Or do you simply mean write, but don't truncate the file? If you do, take a look at the java.io.RandomAccessFile class.
If you need to prepend to a file (that's adding to the start) while keeping the rest intact you have to read the file first, then write all over again with the new data first.