import java.io.*;
import java.io.IOException;
public class WriteTextUtil {
public void writeInAppendMode(String path, String strFinal) throws IOException {
BufferedWriter bw = null;
FileWriter fw = null;
try {
fw = new FileWriter(path, true);
bw = new BufferedWriter(fw);
PrintWriter out = new PrintWriter(bw);
out.println(strFinal);
out.println("\n");
} finally {
if (bw != null)
bw.close();
if (fw != null)
fw.close();
}
}
}
No comments:
Post a Comment