package be.iminds.ilabt.jfed.experimenter_gui.bugreporting;

import be.iminds.ilabt.jfed.log.cache.ApiCallDetailsCache;

import javax.inject.Inject;
import javax.inject.Singleton;
import java.io.InputStream;
import java.io.Reader;

/**
 * User: twalcari
 * Date: 4/10/2015
 * Time: 16:31
 */
@Singleton
public class BugReportReaderFactory {

    private final ApiCallDetailsCache cache;

    @Inject
    public BugReportReaderFactory(ApiCallDetailsCache cache) {
        this.cache = cache;
    }

    public BugReportReader createBugReportReader(InputStream inputStream) {
        return new BugReportReader(inputStream, cache);
    }

    public BugReportReader createBugReportReader(Reader reader) {
        return new BugReportReader(reader, cache);
    }
}
