private static void writeFile(String stringToWrite, String pathResponse) {
FileWriter fw = null;
BufferedWriter out = null;
try {
fw = new FileWriter(pathResponse,true);
out = new BufferedWriter(fw);
out.write(stringToWrite);
} catch (IOException e) {
e.printStackTrace();
}finally{
try {
out.close();
fw.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
No comments:
Post a Comment