public class FileConfigSourceJ extends ConfigSourceJ
Modifier and Type | Field and Description |
---|---|
java.io.File |
file |
Constructor and Description |
---|
FileConfigSourceJ(java.io.File file)
Sources configuration data from a file.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBeOpened()
Tests whether this source can be opened [again].
|
long |
lastModifiedTime()
Provides the timestamp so that source file changes can be observed.
|
java.lang.String |
name()
The file name or similar that identifies the underlying resource.
|
java.io.InputStream |
openTheSource()
Implementations must provide the means to open their input stream in the necessary way.
|
open, timesOpened
public FileConfigSourceJ(java.io.File file)
file
- the file in question. This can also be used directly, e.g. to test whether the file exists
at a given moment.public final long lastModifiedTime()
ConfigSourceJ
lastModifiedTime
in class ConfigSourceJ
public final boolean canBeOpened()
ConfigSourceJ
canBeOpened
in class ConfigSourceJ
public final java.io.InputStream openTheSource() throws java.io.FileNotFoundException
ConfigSourceJ
openTheSource
in class ConfigSourceJ
java.io.FileNotFoundException
public final java.lang.String name()
ConfigSourceJ
name
in class ConfigSourceJ