public void fileAlter(String fileName,String content) throws IOException{
BufferedReader reader = new BufferedReader(new FileReader(fileName));
String line = null;
StringBuilder sb = new StringBuilder();
sb.append(content);
while ((line = reader.readLine()) != null) {
sb.append(line);
sb.append("\r\n");
}
reader.close();
RandomAccessFile mm = new RandomAccessFile(fileName, "rw");
mm.writeBytes(sb.toString());
mm.close();
}