Code example for FileWriter

Methods: close

0
	} 
	 
	public boolean save(String file) {
		try { 
			Yaml yaml = new Yaml();
			FileWriter writer = new FileWriter(new File(file));
			yaml.dump(data, writer);
			writer.close();
		} catch (IOException e) {
		    Log.error("Not able to write file " + file,e);
			return false; 
		} 
		return true; 
	} 
	 
	protected Object getData() {
	    return data;
    } 
}