static public void writeLinesToFile(String filename, ArrayList<String> lines) {

		File file = null;

		try {			
			file = new File(filename);
			file.createNewFile();			
		} catch (Exception e) {			
			e.printStackTrace();
		}

		try {			
			FileWriter writer = new FileWriter(file);
			for (String line : lines)
				writer.write(line + "\n");
			writer.close();
		} catch (IOException e) {			
			e.printStackTrace();
		}
	}