|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.entityfs.util.properties.PropertiesUtil
public final class PropertiesUtil
Utility class with static methods for working with Properties
objects.
Method Summary | |
---|---|
static Properties |
loadFromFile(ReadableFile f)
Load a Properties object from the supplied file. |
static void |
saveToFile(Properties p,
WritableFile f)
Save the Properties object to the supplied file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Properties loadFromFile(ReadableFile f) throws WrappedIOException
Properties
object from the supplied file. The properties
object is not backed by the file, so changes made to the properties will
not automatically be saved in the file. To have a Properties
object that can store its state back to the property file it was loaded
from, use a StorableProperties
implementation instead.
Properties
may be appended to an existing Properties
object by using the Map.putAll(java.util.Map)
method.
The file is locked for reading by this method while it is executing.
f
- The file.
Properties
object with the contents of the file as
properties.
WrappedIOException
- On errors when loading the property file.saveToFile(Properties, WritableFile)
public static void saveToFile(Properties p, WritableFile f) throws WrappedIOException
Properties
object to the supplied file. The previous
contents of the file will be discarded.
The file is locked for writing by this method while it is executing.
p
- The properties object.f
- The file to save the properties to.
WrappedIOException
loadFromFile(ReadableFile)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |