Class PropsUtils

java.lang.Object
nz.ac.waikato.cms.core.PropsUtils

public class PropsUtils extends Object
Helper class for properties files.
Version:
$Revision$
Author:
FracPete (fracpete at waikato dot ac dot nz)
  • Constructor Details

    • PropsUtils

      public PropsUtils()
  • Method Details

    • load

      public static boolean load(Properties props, String filename)
      Loads the properties from the given file.
      Parameters:
      props - the properties object to use
      filename - the file to load the properties from
      Returns:
      true if successfully loaded
    • save

      public static boolean save(Properties props, String filename)
      Saves the properties to the given file.
      Parameters:
      props - the properties object to use
      filename - the file to save the properties to
      Returns:
      true if successfully written
    • save

      public static boolean save(Properties props, String filename, String comment)
      Saves the properties to the given file.
      Parameters:
      props - the properties object to use
      filename - the file to save the properties to
      comment - the comment to use, can be null
      Returns:
      true if successfully written