Курсовая работа: Программа "Система обучения"
if(flag==2)
{
Main.T.timer.cancel();
Main.T.timer.purge();
try {
Scanner in = new Scanner(new File(path));
StringBuffer data = new StringBuffer();
while (in.hasNext()) {
data.append(in.nextLine()).append("\n");
}
String s = data.toString();
int i = s.indexOf("#");
int r = s.indexOf("~");
int t = s.indexOf("%");
int u = s.indexOf("&");
int h = s.indexOf("\n");
String L1 = s.substring(0, i);
String L2 = s.substring(i + 1, r);
String L3 = s.substring(r + 1, t);
String L4 = s.substring(t + 1, u);
String L5 = s.substring(u + 1, h);
Integer y = Main.T.i+Main.T.c;
String Rez = y.toString();
String F = L1 + "#" + L2 + "~" + L3 + "%" + L4 + "&" +Rez ;
File f1;
f1 = new File(path);
PrintWriter writer = null;
writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(path)));
writer.write(F);