package com.avg.zaap.crashlibrary.publish.packer;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

/**
 * Interface for factory used in {@link BinPacker}.
 *
 * Created by marek.osvald on 18.4.2016.
 */
public interface IBinPackerFactory {
    /**
     * Gives new File from given path.
     * @param path to new File.
     * @return new File.
     */
    File getFile(String path);

    /**
     * Gives new FileOutputStream from given file.
     * @param output file to store data to.
     * @return wanted stream.
     * @throws FileNotFoundException when the path is incorrect.
     */
    FileOutputStream getFileOutputStream(File output) throws FileNotFoundException;

    /**
     * Gives new FileInputStream from given file.
     * @param input file to read data from.
     * @return wanted stream.
     * @throws FileNotFoundException when the path is incorrect.
     */
    FileInputStream getFileInputStream(File input) throws FileNotFoundException;

    /**
     * Gives new FileInputStream from given path.
     * @param path to read file.
     * @return wanted stream.
     * @throws FileNotFoundException when the path is incorrect.
     */
    FileInputStream getFileInputStream(String path) throws FileNotFoundException;
}
