Concurrently reading and writing to a file is trickier that it might seem. Generally you would read the file, edit it in memory, and then overwrite the original. Is there some specific reason you want to modify a file this way?
Actually no, I am just starting to learn the basics of I/O and I wondered about all sorts of basic techniques. And since it is a very simple thing to do in a text editing software...
Anyway, I suppose the most basic way of doing it is having an input stream get all the characters and copy them to another file untill the editing point is reached, make the change, and then continue getting input from the previous file to fill the rest.