java.lang.Object
de.edgesoft.edgeutils.files.AppProperties
public class AppProperties
extends java.lang.Object
Methods and storage for application properties.
Legal stuff
Copyright 2010-2020 Ekkart Kleinod ekleinod@edgesoft.de
This file is part of edgeutils.
edgeutils is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
edgeutils is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with edgeutils. If not, see http://www.gnu.org/licenses/.
- Since:
- 0.5.0
- Author:
- Ekkart Kleinod
-
Constructor Summary
Constructors Constructor Description AppProperties() -
Method Summary
Modifier and Type Method Description static java.util.PropertiesgetProperties(java.lang.String theDefaultPropFile, java.lang.String theAppPropFile, boolean ignoreExceptions)Load properties.static java.util.PropertiesgetProperties(java.util.Properties theDefaultProperties, java.lang.String theAppPropFile, boolean ignoreExceptions)Load properties.static voidsaveProperties(java.util.Properties theProps, java.lang.String thePropFile, java.lang.String theComment)Save properties.
-
Constructor Details
-
AppProperties
public AppProperties()
-
-
Method Details
-
getProperties
public static java.util.Properties getProperties(java.util.Properties theDefaultProperties, java.lang.String theAppPropFile, boolean ignoreExceptions) throws java.io.IOExceptionLoad properties.- Parameters:
theDefaultProperties- default properties (null = none)theAppPropFile- application properties file (null = none)ignoreExceptions- irgnore exceptions?- Returns:
- loaded properties
- Throws:
java.io.IOException- if one occurs, just delegates thrown exceptions- Since:
- 0.8.0
-
getProperties
public static java.util.Properties getProperties(java.lang.String theDefaultPropFile, java.lang.String theAppPropFile, boolean ignoreExceptions) throws java.io.IOExceptionLoad properties.- Parameters:
theDefaultPropFile- default properties file (null = none)theAppPropFile- application properties file (null = none)ignoreExceptions- irgnore exceptions?- Returns:
- loaded properties
- Throws:
java.io.IOException- if one occurs, just delegates thrown exceptions
-
saveProperties
public static void saveProperties(java.util.Properties theProps, java.lang.String thePropFile, java.lang.String theComment) throws java.io.IOExceptionSave properties.- Parameters:
theProps- properties to savethePropFile- properties filetheComment- comment (null for no comment)- Throws:
java.io.IOException- if one occurs, just delegates thrown exceptions
-