views:

21

answers:

1

I write file to sdcard using BufferedWriter.After that I want to overwrite header of file,but other data must be without changes( In the header I must add size of file). So I think I must change position where I need write.

How can I do that?What function should I use?

A: 

You can use a RandomAccessFile to access a file, and modify it.

Colin Hebert