package com.menzus.gcj._2012.qualification.c;

import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;

public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
    public CProcessorFactory(String inputFileName) {
	super(inputFileName);
    }

    @Override
    protected InputBlockParser<CInput> createInputBlockParser() {
	return new CInputBlockParser();
    }

    @Override
    protected OutputProducer<CInput, COutputEntry> createOutputProducer() {
	return new COutputProducer();
    }
}

package recycledNumbers;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;

public class OutputFile
{
	public void writeFile(ArrayList<String> data) throws Exception
	{
		File file = new File("C:\\Users\\Nikhil\\Desktop\\googleCodeJam\\output.txt");
		
		BufferedWriter bufferedwriter = new BufferedWriter(new FileWriter(file));
		
		for(int i=0;i<data.size();i++)
		{
			
			bufferedwriter.write(data.get(i));
			bufferedwriter.newLine();
		}
		bufferedwriter.flush();
		
	}
}
