private void writeFile(String path, String content) {
File file = null;
FileOutputStream fos = null;
try {
file = new File(path);
if (!file.exists()) {
file.createNewFile();
}
// append if true, then bytes will be written to the end of the file rather than the beginning
fos = new FileOutputStream(file, true);
fos.write(content.getBytes());
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (fos != null) {
fos.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
} private void writeFile(String path, String conten