@Test(expected = FileNotFoundException.class) public void testReadPropertiesFileNotFoundNull() throws IOException { PropertiesUtils.readProperties((File) null); fail(ResourcesPublicUtilTest.EXPECTING_EXCEPTION_FILE_NOT_FOUND_EXCEPTION); }
public static Properties readProperties(File propertiesFile) throws IOException { if (propertiesFile == null) { throw new FileNotFoundException(FILE_NOT_FOUND_IN_RESOURCES + propertiesFile); } final Properties properties = new Properties(); try (InputStream inputStream = new FileInputStream(propertiesFile)) { properties.load(inputStream); } return properties; }
PropertiesUtils { public static Properties readProperties(File propertiesFile) throws IOException { if (propertiesFile == null) { throw new FileNotFoundException(FILE_NOT_FOUND_IN_RESOURCES + propertiesFile); } final Properties properties = new Properties(); try (InputStream inputStream = new FileInputStream(propertiesFile)) { properties.load(inputStream); } return properties; } }
PropertiesUtils { public static Properties readProperties(File propertiesFile) throws IOException { if (propertiesFile == null) { throw new FileNotFoundException(FILE_NOT_FOUND_IN_RESOURCES + propertiesFile); } final Properties properties = new Properties(); try (InputStream inputStream = new FileInputStream(propertiesFile)) { properties.load(inputStream); } return properties; } private  PropertiesUtils(); }
PropertiesUtils { public static Properties readProperties(File propertiesFile) throws IOException { if (propertiesFile == null) { throw new FileNotFoundException(FILE_NOT_FOUND_IN_RESOURCES + propertiesFile); } final Properties properties = new Properties(); try (InputStream inputStream = new FileInputStream(propertiesFile)) { properties.load(inputStream); } return properties; } private  PropertiesUtils(); static InputStream getConfigAsStream(String resourcesFile); static InputStream getResourceAsStream(String resourcesFile); static File getResourceFile(String resourcesFile); static Path getResourcePath(String resourcesFile); static Stream<String> getResourceListing(Class clazz, String path); static File findFile(String filename); static File fileFromConfigFolder(String subpath); static File fileFromDataFolder(String subpath); static File fileFromTmpFolder(String subpath); static Properties readProperties(File propertiesFile); static C readYaml(File yamlFile, Class<C> clasz); static C readYaml(File yamlFile, TypeReference<C> typeReference); static C readYaml(InputStream yamlInputStream, Class<C> clasz); static C readYaml(Path yamlPath, Class<C> clasz); static void writeYaml(File destination, Object config); static String getResourceAsString(String resourcesFile); }
PropertiesUtils { public static Properties readProperties(File propertiesFile) throws IOException { if (propertiesFile == null) { throw new FileNotFoundException(FILE_NOT_FOUND_IN_RESOURCES + propertiesFile); } final Properties properties = new Properties(); try (InputStream inputStream = new FileInputStream(propertiesFile)) { properties.load(inputStream); } return properties; } private  PropertiesUtils(); static InputStream getConfigAsStream(String resourcesFile); static InputStream getResourceAsStream(String resourcesFile); static File getResourceFile(String resourcesFile); static Path getResourcePath(String resourcesFile); static Stream<String> getResourceListing(Class clazz, String path); static File findFile(String filename); static File fileFromConfigFolder(String subpath); static File fileFromDataFolder(String subpath); static File fileFromTmpFolder(String subpath); static Properties readProperties(File propertiesFile); static C readYaml(File yamlFile, Class<C> clasz); static C readYaml(File yamlFile, TypeReference<C> typeReference); static C readYaml(InputStream yamlInputStream, Class<C> clasz); static C readYaml(Path yamlPath, Class<C> clasz); static void writeYaml(File destination, Object config); static String getResourceAsString(String resourcesFile);  }