Thanks for your replays but I think I have not explain properly what I'm looking for.
Usualy I have a plain text and I reed the file, line by line, and I put into, for example, Strings a specific position of each line.
path = fileChooser.getSelectedFile();
FileReader fr = new FileReader(path);
BufferedReader br = new BufferedReader(fr);
String line;
while((line = br.readLine()) != null){
String month = line.substring(56,58).trim();
String year = line.substring(58,62).trim();
// Do what ever I need with the Strings
.
.
.
}//close while
fr.close();
What I'm looking for is a method to write a String that I have in a specific position of a file's line. Imagine position 56 to 58.
Something like that :
String month = myMonth;
1st line of the file;
write month in position 56,58 of 1st line;
month = myOtherMonth;
2nd line;
write month in position 56,58 of 2nd line;
Hope somebody can help me.
Thanks!