try {
output = new BufferedWriter(new FileWriter(file));
//output.write(anAL);
for (Iterator elementsInList = anAL.iterator(); elementsInList.hasNext();) {
<WHAT IS IN THE LIST> element = (<WHAT IS IN THE LIST>) elementsInList.next();
output.write(<GET/MAKE String thing from your element>);
}
} finally {
if (output != null)
output.close();
}
Take care of exceptions in the code above as well ..