Package edu.sc.seis.TauP
Class PropertyLoader
java.lang.Object
edu.sc.seis.TauP.PropertyLoader
convenience class for loading properties.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Propertiesload()loads the properties from a file.static voidsave(Properties props) writes the current system properties out to the file given.static voidsave(Properties props, String filename) writes the current system properties out to the file given.
-
Field Details
-
defaultPropFileName
-
packageName
-
propFileName
-
-
Constructor Details
-
PropertyLoader
public PropertyLoader()
-
-
Method Details
-
load
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
writes the current system properties out to the file given.- Throws:
IOException
-
save
writes the current system properties out to the file given.- Throws:
IOException
-