Class AppProperties

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.Properties getProperties​(java.lang.String theDefaultPropFile, java.lang.String theAppPropFile, boolean ignoreExceptions)
    Load properties.
    static java.util.Properties getProperties​(java.util.Properties theDefaultProperties, java.lang.String theAppPropFile, boolean ignoreExceptions)
    Load properties.
    static void saveProperties​(java.util.Properties theProps, java.lang.String thePropFile, java.lang.String theComment)
    Save properties.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getProperties

      public static java.util.Properties getProperties​(java.util.Properties theDefaultProperties, java.lang.String theAppPropFile, boolean ignoreExceptions) throws java.io.IOException
      Load 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.IOException
      Load 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.IOException
      Save properties.
      Parameters:
      theProps - properties to save
      thePropFile - properties file
      theComment - comment (null for no comment)
      Throws:
      java.io.IOException - if one occurs, just delegates thrown exceptions