I'm having a problem with my code, I would like to modify a line in the file when I'm reading it in the reverse order.
The code that I have is this:
try {
ReversedLinesFileReader rf = new ReversedLinesFileReader(fileSql);
while ((line = rf.readLine()) != null) {
if (Pattern.matches(".*"+pomVersion+".*", line)) {
// HERE IS WHEN I WANT TO MODIFY THE THE LINE OF THE FILE WHILE I'M READING IT IN REVERSE ORDEN
.....
break;
}
}
} catch (IOException e) {
e.printStackTrace();
}
So, I don't know how could I modify that line in specific while I'm reading the file in reserve order, any idea?
Thanks in advance!