All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.co.mruoc.properties.FileSystemInputStreamLoader Maven / Gradle / Ivy

Go to download

Code library to easily load files and file from the classpath or file system file

There is a newer version: 7.0.4
Show newest version
package uk.co.mruoc.properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.*;

public class FileSystemInputStreamLoader implements InputStreamLoader {

    private static final Logger LOGGER = LoggerFactory.getLogger(FileSystemInputStreamLoader.class);

    @Override
    public InputStream load(String path) {
        try {
            LOGGER.debug("loading input stream from file system using path " + path);
            return new FileInputStream(new File(path));
        } catch (FileNotFoundException e) {
            throw new UncheckedIOException(path, e);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy