Results 1 to 2 of 2
- 03-02-2009, 04:22 PM #1Member
- Join Date
- Feb 2009
- Rep Power
Writing To A Specific Text File Line
In a program I am writing I need to be able to write to the end of a specific line in a textfile. I'm not sure of any particular way to do this apart from perhaps rewriting the whole textfile which would be a pain to do. Does anyone know of a simpler way of how to do this?
If you think about how text files are stored on a hard drive, can you picture any way any computer program can write to a specific point in the file without over writing the file? If you tried to write data in at a specific point in the file, you'd be over-writing any data that normally would follow the starting point, and that won't do.
Unless you're talking about randomaccess files (and I don't recommend that here), you're probably better off over-writing the entire file.
- By matpj in forum New To JavaReplies: 13Last Post: 02-24-2010, 05:28 PM
- By Manfizy in forum NetBeansReplies: 6Last Post: 12-12-2008, 03:35 PM
- By jadaleus in forum Advanced JavaReplies: 10Last Post: 10-24-2008, 07:21 PM
- By jadaleus in forum Advanced JavaReplies: 1Last Post: 10-24-2008, 12:31 AM
- By notwist in forum New To JavaReplies: 3Last Post: 04-25-2008, 04:20 AM