package com.avg.zaap.crashlibrary.offline.publisher.metadata;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;

/**
 * This class serves as the default dependency for the crash metadata writer.
 * <p/>
 * Created by marek.osvald on 28.7.2016.
 */
public class CrashMetadataWriterFactory implements ICrashMetadataWriterFactory {

    @Override
    public ICrashMetadataHelper getCrashMetadataHelper() {
        return new CrashMetadataHelper();
    }

    @Override
    public File openFile(File directory, String fileName) {
        return new File(directory, fileName);
    }

    @Override
    public OutputStreamWriter getFileWriter(File file) throws IOException {
        return new FileWriter(file);
    }

}
