class PropertiesUtils {

    public static InputStream getResourceAsStream(String resourcesFile) throws FileNotFoundException {
        if (resourcesFile == null) {
            throw new FileNotFoundException(FILE_NOT_FOUND_IN_RESOURCES);
        }
        InputStream stream = null;
        try {
            stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcesFile);
        } catch (final SecurityException e) {
            // since another exception is thrown
            SysErrLogger.FAKE_LOGGER.ignoreLog(e);
        }
        if (stream == null) {
            try {
                stream = PropertiesUtils.class.getClassLoader().getResourceAsStream(resourcesFile);
            } catch (final SecurityException e) {
                // since another exception is thrown
                SysErrLogger.FAKE_LOGGER.ignoreLog(e);
            }
        }
        if (stream == null) {
            throw new FileNotFoundException(FILE_NOT_FOUND_IN_RESOURCES + resourcesFile);
        }
        return stream;
    }

    private  PropertiesUtils();

}