// Path: src/main/java/com/tngtech/propertyloader/impl/interfaces/PropertyLoaderOpener.java
// public interface PropertyLoaderOpener {
// 
//     /**
//      * Attempt to find and open some property file.
//      *
//      * @param fileName A relative filename (using '/' as directory separator on all platforms)
//      * @return An input stream reading from that file, or null if the file could not be found
//      */
//     InputStream open(String fileName);
// }


import com.tngtech.propertyloader.impl.interfaces.PropertyLoaderOpener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.util.InvalidPropertiesFormatException;
import java.util.Properties;
package com.tngtech.propertyloader.impl;



public class PropertyFileReader {

    private static final Logger log = LoggerFactory.getLogger(PropertyFileReader.class);

    private final PropertyLoaderFactory propertyLoaderFactory;

    public PropertyFileReader(PropertyLoaderFactory propertyLoaderFactory) {
        this.propertyLoaderFactory = propertyLoaderFactory;
    }

// Path: src/main/java/com/tngtech/propertyloader/impl/interfaces/PropertyLoaderOpener.java
// public interface PropertyLoaderOpener {
// 
//     /**
//      * Attempt to find and open some property file.
//      *
//      * @param fileName A relative filename (using '/' as directory separator on all platforms)
//      * @return An input stream reading from that file, or null if the file could not be found
//      */
//     InputStream open(String fileName);
// }


// Path: src/main/java/com/tngtech/propertyloader/impl/PropertyFileReader.java
import com.tngtech.propertyloader.impl.interfaces.PropertyLoaderOpener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.util.InvalidPropertiesFormatException;
import java.util.Properties;

package com.tngtech.propertyloader.impl;



public class PropertyFileReader {

    private static final Logger log = LoggerFactory.getLogger(PropertyFileReader.class);

    private final PropertyLoaderFactory propertyLoaderFactory;

    public PropertyFileReader(PropertyLoaderFactory propertyLoaderFactory) {
        this.propertyLoaderFactory = propertyLoaderFactory;
    }

    public Properties tryToReadPropertiesFromFile(String fileName, String propertyFileEncoding, PropertyLoaderOpener opener) {