|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.tomgibara.pronto.config.source.FileConfigSource
public class FileConfigSource
Parses a file into configuration properties. Instances of this class are safe for concurrent use.
| Constructor Summary | |
|---|---|
FileConfigSource(java.io.File file)
Constructs a source which reads its properties from a file using a DefaultPropertiesReader. |
|
FileConfigSource(java.io.File file,
PropertiesReader reader)
Constructs a source which reads its properties from a file using the supplied properties reader. |
|
| Method Summary | |
|---|---|
java.io.File |
getFile()
The file from which the properties are loaded. |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
The properties read from this source's file. |
PropertiesReader |
getReader()
The reader which converts this source's file into properties. |
long |
lastModified()
The date on which the file was last modified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileConfigSource(java.io.File file)
file - the file from which the properties are to be loaded, not null
public FileConfigSource(java.io.File file,
PropertiesReader reader)
file - the file from which the properties will be readreader - a properties reader which can convert the file into a set of
properties, may be null| Method Detail |
|---|
public java.io.File getFile()
public PropertiesReader getReader()
public long lastModified()
throws java.lang.RuntimeException
lastModified in interface ConfigSourcejava.lang.RuntimeException - if the file's last modified time may not be read
public java.util.Map<java.lang.String,java.lang.String> getProperties()
throws java.lang.RuntimeException
getProperties in interface ConfigSourcejava.lang.RuntimeException - if an IOException occurs reading the file
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||