it.espr.injector.Properties Maven / Gradle / Ivy
package it.espr.injector;
import static it.espr.injector.Utils.isEmpty;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Properties {
private static final Logger log = LoggerFactory.getLogger(Properties.class);
public Map load() {
return this.load(null);
}
public Map load(String filename) {
Map properties = new HashMap<>();
java.util.Properties file = this.loadPropertyFile(this.getFileClasspath(filename));
if (file != null && !file.isEmpty()) {
for (Entry