try{
BufferedWriter bufWriter = new BufferedWriter(new FileWriter(logFile, append));
Iterator it = toWrite.getIterator();
while(it.hasNext()){
Table1Container container = (Table1Container)it.next();
String[] containerString = container.getTableItemsAsString();
for(int i = 0; i < containerString.length; i++){
bufWriter.write(containerString[i] + ",");
}
bufWriter.newLine();
}
bufWriter.close();
}catch(Exception e){
//e.printStackTrace();
BufferedWriter bufWriter;
try {
bufWriter = new BufferedWriter(new FileWriter(logFile, append));
Iterator it = toWrite.getIterator();
while(it.hasNext()){
Table2Container container = (Table2Container)it.next();
String[] containerString = container.getTableItemsAsString();
for(int i = 0; i < containerString.length; i++){
bufWriter.write(containerString[i] + ",");
}
bufWriter.newLine();