JAVA-19115 Create new core-java-properties sub module under core-java-modules (#13669)
* JAVA-19115 Create new core-java-properties sub module under core-java-modules
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
package com.baeldung.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
public class PropertiesLoader {
|
||||
|
||||
public static Properties loadProperties(String resourceFileName) throws IOException {
|
||||
Properties configuration = new Properties();
|
||||
InputStream inputStream = PropertiesLoader.class
|
||||
.getClassLoader()
|
||||
.getResourceAsStream(resourceFileName);
|
||||
configuration.load(inputStream);
|
||||
inputStream.close();
|
||||
return configuration;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user