package analyzer;

import java.io.File;
import java.io.FileWriter;

public class TrainFileWriter {
	String mFilename;

	public TrainFileWriter(String filename) {
		mFilename = filename;
	}

	public boolean writeRecord(String record) {
		FileWriter fileWriter = null;
		try {
			fileWriter = new FileWriter(new File(mFilename), true);

			fileWriter.write("UserEntry. " + record + System.getProperty("line.separator"));

			fileWriter.close();
		} catch (Exception e) {
			e.printStackTrace();

			return false;
		}

		return true;
	}
}
