in.tombo.ponto.PropertiesService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ponto Show documentation
Show all versions of ponto Show documentation
Ponto is typesafe accessor generator for properties file.
package in.tombo.ponto;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Properties;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class PropertiesService {
private Logger logger;
private String[] filePaths;
private String envValue;
private Properties properties;
private Properties envProperties;
private long scanPeriod;
private long loadTime;
private String encoding;
public PropertiesService(String loggerName, long scanPeriod, String envValue, String encoding,
String... filePaths) {
this.logger = LoggerFactory.getLogger(loggerName);
this.envValue = envValue;
this.filePaths = filePaths;
this.scanPeriod = scanPeriod;
this.loadTime = 0L;
this.encoding = encoding;
loadProperties();
loggingSettings();
}
public Properties getProperties() {
Properties p = new Properties();
Set
© 2015 - 2025 Weber Informatics LLC | Privacy Policy