Ok, so I am trying to remove lines from a text file using java. Currently, as I do this, I am tracking the line number and entering an index. The index is the row I want to delete. Therefore, every time I read a new row of data, I increase the number of rows. Now when I get the line count, which is the same index, I am not writing data to a temporary file. Now it works, but what if, for example, I work with huge files, and I have to worry about memory limitations. How can I do this with ... file markers? For example .. put the file marker on the line I want to delete. Then delete this line? Or is it too much work?
source
share