Class PropertyLoader

java.lang.Object
edu.sc.seis.TauP.PropertyLoader

public class PropertyLoader extends Object
convenience class for loading properties.
  • Field Details

    • defaultPropFileName

      protected static String defaultPropFileName
    • packageName

      protected static String packageName
    • propFileName

      protected static String propFileName
  • Constructor Details

    • PropertyLoader

      public PropertyLoader()
  • Method Details

    • load

      public static Properties load() throws IOException
      loads the properties from a file. First the default properties are loaded from the distribution jar file, then the users properties are loaded, overwriting the default values. This uses ".taup" in the users home directory, followed by ".taup" in the current directory if it can be found. If neither can be found then the default Properties object is returned unmodified.

      A special case is made for the taup.model.path property. If it is defined in the system properties, then the system version is prepended to the users version. This allows for setting system wide search paths on UNIX via an environment variable, which is transformed into a property by the sh scripts, while still allowing individual users as well as non-UNIX systems to customize the search path.

      Throws:
      IOException
    • save

      public static void save(Properties props) throws IOException
      writes the current system properties out to the file given.
      Throws:
      IOException
    • save

      public static void save(Properties props, String filename) throws IOException
      writes the current system properties out to the file given.
      Throws:
      IOException