Rename datasource package
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-22 23:44:34 +01:00
parent be3895d268
commit ff084cf8e8
7 changed files with 12 additions and 12 deletions

View File

@@ -0,0 +1,37 @@
package wtf.beatrice.hidekobot.datasources;
import wtf.beatrice.hidekobot.HidekoBot;
import wtf.beatrice.hidekobot.util.Logger;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class PropertiesSource
{
private Properties properties = null;
private final String fileName = "default.properties";
private final Logger logger = new Logger(getClass());
public void load()
{
properties = new Properties();
try (InputStream internalPropertiesStream = getClass()
.getClassLoader()
.getResourceAsStream(fileName))
{
properties.load(internalPropertiesStream);
}
catch (IOException e) {
logger.log(e.getMessage());
HidekoBot.shutdown();
return;
}
}
public String getProperty(String property)
{ return properties == null ? "" : properties.getProperty(property); }
}